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

Support #/components/responses #70

Open
Tomboyo opened this issue Feb 12, 2023 · 0 comments
Open

Support #/components/responses #70

Tomboyo opened this issue Feb 12, 2023 · 0 comments

Comments

@Tomboyo
Copy link
Owner

Tomboyo commented Feb 12, 2023

Lily must read the #/components/responses section of the OAS and generate re-usable response objects from it.

We are already able to generate responses from anonymous definitions in operations, which created sealed interfaces (MyResponse permits MyResponse200, MyResponse404, ...). However, that code doesn't account for $refs when creating the interfaces (that work is deferred to this ticket). Because responses are generated as a sealed interface, Lily needs to make $referenced responses from /components/responses members of each API response that uses them. So, for example, if GetFoo and BetBar operations rely on a shared Generic500Response schema, then Generic500Response's class must implement GetFooResponse and GetBarResponse.

@Tomboyo Tomboyo converted this from a draft issue Feb 12, 2023
@Tomboyo Tomboyo added this to the Back-fill component support milestone Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant