Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Not Working (Using the API with Docker) #52

Open
d9it opened this issue Mar 10, 2021 · 3 comments
Open

API Not Working (Using the API with Docker) #52

d9it opened this issue Mar 10, 2021 · 3 comments

Comments

@d9it
Copy link

d9it commented Mar 10, 2021

Using the API with Docker

Hosted the project on Docker & trying API "/transform" method POST from the postman, Getting an error "A mapping file is required".

I have added the
input_path : /spec/fixtures/base_transformer/input
mapping : /spec/fixtures/base_transformer/mapping.yaml

But still getting the error "A mapping file is required".

@switzersc
Copy link
Collaborator

Hello! My first thought here is that the paths you've posted look like relative paths being treated like absolute paths. In terminal, from any directory, if you run cat /spec/fixtures/base_transformer/mapping.yaml, do you get an error? If so, then the path is the problem.

To get the absolute path for both mapping and input_path, follow these steps:

In terminal, cd into the directory that contains the mapping.yaml file.
Run pwd
Use the output to create the correct path values. For example, if pwd returns Users/d9it/hsds-transformer/spec/fixtures/base_transformer, then your mapping path becomes Users/d9it/hsds-transformer/spec/fixtures/base_transformer/mapping.yaml and your input_path becomes Users/d9it/hsds-transformer/spec/fixtures/base_transformer/input.

@d9it
Copy link
Author

d9it commented Mar 25, 2021

The path issue is resolved, But getting ArgumentError when trying curl request
2021-03-18 (1)

@switzersc
Copy link
Collaborator

Interesting. Have you confirmed the files are encoded properly? Can you please post your files here so I can test locally too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants