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

Modify the OpenAPI parsing and toPattern logic for allOf schema. #1420

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

StarKhan6368
Copy link
Contributor

What: Modify the OpenAPI parsing and toPattern logic for allOf schema.

Why:

  • The allOf schema discriminators are currently resolved at multiple levels, with the selection of discriminators taking place not only at the schema level but also within the deeper structure.
  • This restricts the discriminators resolving to only the top level of the schema.

How:

  • Using a topLevel flag when processing allOf schemas.

Checklist:

- Only top level discriminator information should be considered.
- Fix potential bug with PatternBasedAttributeSelectionGenerator
- Add tests for generating examples using the Interactive
  Server for discriminator based scenarios top and deep levels.
- Add test for the OpenApiSpecification parsing toSpecmaticPattern.
- Reset ExamplesInteractiveServer Internal Examples Atomic Counter
  Before each test, resetting the count to initial value.
@StarKhan6368 StarKhan6368 force-pushed the toplevel-discriminator-only branch from a52a3b4 to 11e04be Compare November 12, 2024 05:30
@joelrosario joelrosario merged commit a9bc5d5 into main Nov 12, 2024
2 checks passed
@joelrosario joelrosario deleted the toplevel-discriminator-only branch November 12, 2024 15:59
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.

2 participants