Skip to content

Conversation

mallachari
Copy link

Needed by stoplightio/json-schema-viewer#105
Adds const and x-example properties to annotations.

@mallachari mallachari requested review from a team and P0lip February 15, 2021 19:52
@mallachari
Copy link
Author

Should this target master or beta?

Copy link
Contributor

@P0lip P0lip left a comment

Choose a reason for hiding this comment

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

👍
It can target master.

@mallachari mallachari merged commit 5a09940 into master Feb 15, 2021
@mallachari mallachari deleted the feat/extended-annotations branch February 15, 2021 20:03
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

@marcelltoth marcelltoth left a comment

Choose a reason for hiding this comment

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

FWIW if you'd like to avoid these kinds of duplications and you are willing to move either the const or the type, you can do:

 const ANNOTATIONS = ['description', 'default', 'examples', 'const', 'x-example'] as const; 

export type SchemaAnnotations = typeof ANNOTATIONS[number]; 

What do you think @P0lip ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants