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

Allow showing SchemaDefinition as child #2533

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

DuckyC
Copy link

@DuckyC DuckyC commented Apr 28, 2024

What/Why/How?

When using SchemaDefinition to show a ref that is a child of an object with discriminator, sometimes you want to show that exact child, and not the parent.

Reference

Tests

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

@DuckyC DuckyC requested a review from a team as a code owner April 28, 2024 11:21
options,
);
const info = SchemaDefinition.getMediaType(schemaRef, exampleRef);
this._mediaModel = new MediaTypeModel(parser, 'json', false, info, options, showAsChild);
Copy link
Author

@DuckyC DuckyC Apr 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added showAsChild but removing newlines was prettier

@DuckyC
Copy link
Author

DuckyC commented Apr 28, 2024

Would love some guidance on how a test could be added to this 🙏

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.

None yet

1 participant