openreferral / hsds-transformer

Convert data into valid Human Service Data Specification (HSDS) datapackages. (Produced by the Open Referral Initiative.)
MIT License
11 stars 5 forks source link

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

Open d9it opened 3 years ago

d9it commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

switzersc commented 3 years ago

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