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: cli schema export with non-serializable types #2581

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

peterschutt
Copy link
Contributor

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

When schema includes examples that include types unable to be serialized by default with builtin json/yaml parsers the schema generation currently fails.

This PR uses msgspec for encoding the outbound schema so that we can leverage our custom serializers, as well as custom encoders defined on the application.

Close Issue(s)

Closes #2575

When schema includes examples that include types unable to be serialized by default with builtin json/yaml parsers the schema generation currently fails.

This PR uses msgspec for encoding the outbound schema so that we can leverage our custom serializers, as well as custom encoders defined on the application.

Closes #2575
@peterschutt peterschutt requested review from a team as code owners October 31, 2023 23:57
Copy link
Member

@cofin cofin left a comment

Choose a reason for hiding this comment

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

LGTM

@cofin cofin enabled auto-merge (squash) November 1, 2023 01:02
Copy link

sonarcloud bot commented Nov 1, 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

@cofin cofin merged commit 17fadeb into main Nov 1, 2023
16 checks passed
@cofin cofin deleted the 2575-cli-schema-export-failure branch November 1, 2023 01:29
Copy link

github-actions bot commented Nov 1, 2023

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

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: CLI Schema Export fails
2 participants