We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Does it make sense to add the validation rules defined in “openapi.yaml” to the JS Doc of the generated types/interfaces?
JS Doc
For example, having a user.json-schema with a username-property:
user.json
username
"username" : { "type" : "string", "description" : "The username", "pattern" : "\\S", "minLength" : 2, "maxLength" : 20 },
will generate the following JS Doc:
/** * @description The username * @type string */ username: string
Would be nice to enhance the JS Doc (maybe by a setting in pluginTs) to the following (btw, orval does this also):
pluginTs
/** * The username * * @type string * @minLength 2 * @maxLength 20 * @pattern \S */ username: string;
This can be achieved by adding each schema tag to the generated JS document in the following format:
/** * @[tag] [value] */
No response
The enhanced JavaScript Doc allows the user to see the validation rules immediately via the API (without having to dig into openapi.yaml).
JavaScript Doc
openapi.yaml
The text was updated successfully, but these errors were encountered:
stijnvanhulle
Successfully merging a pull request may close this issue.
What is the problem this feature would solve?
Does it make sense to add the validation rules defined in “openapi.yaml” to the
JS Doc
of the generated types/interfaces?For example, having a
user.json
-schema with ausername
-property:will generate the following
JS Doc
:Would be nice to enhance the
JS Doc
(maybe by a setting inpluginTs
) to the following (btw, orval does this also):This can be achieved by adding each schema tag to the generated JS document in the following format:
External documents/projects?
No response
What is the feature you are proposing to solve the problem?
The enhanced
JavaScript Doc
allows the user to see the validation rules immediately via the API (without having to dig intoopenapi.yaml
).What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: