highsidelabs / saloon-sdk-generator

Generate Saloon SDKs from Postman Collections and OpenAPI Specifications.
MIT License
2 stars 5 forks source link

Include the body content type in Schema #3

Closed dpash closed 3 months ago

dpash commented 3 months ago

We only want to add the HasJsonBody trait to requests expecting an application/json body, but this information is not currently available

This commit adds the data into the schema object so we can retrieve it when generating request objects.

dpash commented 3 months ago

This is required to fix https://github.com/jlevers/selling-partner-api/issues/711 and replace https://github.com/jlevers/selling-partner-api/pull/716 and https://github.com/jlevers/selling-partner-api/pull/715.

Once this is merged I can create a PR for the selling-partner-api side

jlevers commented 3 months ago

Thanks! I have an implementation of this that handles several common content type options sitting on my local branch, but haven't had a chance to test it thoroughly yet. Gonna merge this for now, but just want to give you a heads up that it will probably get overwritten relatively soon.

Edit: sorry, I was looking at your RequestGenerator changes on your jlevers/selling-partner-api fork by accident and got mixed up. Disregard this comment.