JSON schema supports @x-plugin null comment.
#1717
Merged
+8
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the handling of jsDoc tags in the JSON schema plugin to support proper casting of the string
"null"to the JavaScriptnullvalue. It also adds corresponding tests to ensure this behavior is correctly validated.Enhancements to jsDoc tag value casting:
castfunction insrc/programmers/internal/json_schema_jsDocTags.tsto convert the string"null"to the JavaScriptnullvalue, in addition to existing conversions for booleans and numbers.Testing improvements:
test/src/features/issues/test_pr_1714_json_schema_plugin_by_jsDocTags.tsto verify that the new@x-null-value nulljsDoc tag is correctly cast tonullin the generated schema.ISomethinginterface in the same test file to include the@x-null-value nulljsDoc tag for theidproperty.Version update:
package.jsonfrom11.0.1to11.0.2to reflect these changes.