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

fix: rendering of openapi parameter examples #2509

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

peterschutt
Copy link
Contributor

@peterschutt peterschutt commented Oct 24, 2023

Pull Request Checklist

  • New code has 100% test coverage
  • (If applicable) The prose documentation has been updated to reflect the changes introduced by this PR
  • (If applicable) The reference documentation has been updated to reflect the changes introduced by this PR
  • Pre-Commit Checks were ran and passed
  • Tests were ran and passed

Description

Parameter examples should be a mapping of example names mapped to Example objects.

This PR builds such a mapping for parameters that have examples defined.

This PR does not modify existing behavior that adds examples to the parameter's schema object.

Before PR:

image

After PR:

swagger:

image

redoc:

image

elements:

image

Close Issue(s)

Closes #2494

@peterschutt peterschutt requested review from a team as code owners October 24, 2023 03:35
Parameter examples should be a mapping of example names mapped to `Example` objects.

This PR builds such a mapping for parameters that have examples defined.

This PR does not modify existing behavior that adds examples to the parameter's schema object.

Closes #2494
@sonarcloud
Copy link

sonarcloud bot commented Oct 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@github-actions
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/2509

@JacobCoffee JacobCoffee merged commit e7fa9d8 into main Oct 24, 2023
22 checks passed
@JacobCoffee JacobCoffee deleted the 2494-openapi-parameter-examples branch October 24, 2023 04:32
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.

Bug: Wrong OpenAPI examples format and nesting
2 participants