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

add response schemas and types #517

Closed

Conversation

robot-ranger
Copy link
Contributor

@robot-ranger robot-ranger commented Jan 16, 2025

I added minimal response content spec to swagger generation. This should enable the use of https://github.com/swagger-api/swagger-codegen to generate functional swagger clients; returning the entire response doc from the agent.

I have tested with a generated python swagger client. I assume, but have not tested, it should enable functional, auto-generated, clients in any language swagger-codegen supports.

@mnoomnoo helped; i cant take all the credit.

fixes #515

@robot-ranger
Copy link
Contributor Author

hold off on this. i guess the order of the content responses implies the "default" response type. json has to be listed first in order for swagger-codegen to recognize the response type as 'object' instead of 'str'. this distinction is critical for json responses; otherwise you get a json-like string back instead of an actual json (single quotes ' instead of json spec double quotes ")

ill submit another PR; dont merge this one.

@wsobel
Copy link
Member

wsobel commented Jan 17, 2025

Got it. I'll wait.

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

Successfully merging this pull request may close these issues.

Swagger missing schema(s)
2 participants