Skip to content

OpenAPI output: add aliases and support for non exhaustive enums #2565

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

Merged
merged 1 commit into from
May 22, 2024

Conversation

swallez
Copy link
Member

@swallez swallez commented May 22, 2024

Improve the OpenAPI output for enumerations:

  • add aliases to the list of allowed strings
  • implement non-exhaustive enumerations as an any({enum members}, {any string}). Keeping the enum values in the schema should allow tools to provide them in autocompletion while allowing any value.

Also updates Cargo dependencies (in particular wasm-bindgen) to fix rustwasm/wasm-bindgen#3808

@swallez swallez requested a review from a team as a code owner May 22, 2024 15:03
Copy link
Contributor

@Anaethelion Anaethelion left a comment

Choose a reason for hiding this comment

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

LGTM!

@swallez swallez merged commit 258c7c0 into elastic:main May 22, 2024
6 checks passed
@swallez swallez deleted the fix-enums branch May 22, 2024 15:51
github-actions bot pushed a commit that referenced this pull request May 22, 2024
swallez added a commit that referenced this pull request May 22, 2024
…) (#2568)

(cherry picked from commit 258c7c0)

Co-authored-by: Sylvain Wallez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants