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

Gracefully handle duplicate schema elements #86

Open
Tomboyo opened this issue Jul 28, 2023 · 0 comments
Open

Gracefully handle duplicate schema elements #86

Tomboyo opened this issue Jul 28, 2023 · 0 comments

Comments

@Tomboyo
Copy link
Owner

Tomboyo commented Jul 28, 2023

As a user, when I try to compile an OAS document that has duplicate elements due to author error, Lily should warn me about the error (and tell me which generated types are impacted), but continue generating classes so that I can work with as much of the OAS that is well-formed as possible rather than be completely blocked.

For example:

openapi: 3.0.2
  components:
    schemas:
      Foo: ...
      Foo: ... # A duplicate component

This should also be the case when Lily decides to name an anonymous type in such a way that it collides with another type. Ideally this is logged at a more severe level than usual since it's a design flaw on our part, if possible.

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