Add minItems and maxItems to JSON schema - #388
Open
Markus1812 wants to merge 1 commit into
Open
Markus1812 wants to merge 1 commit into
Markus1812 wants to merge 1 commit into
Conversation
Support the \ and \ ABAP Doc annotations on internal tables. These are emitted as minItems / maxItems constraints for array types in the generated JSON schema. - Parse the new annotations in zcl_aff_abap_doc_parser - Merge them in zcl_aff_writer~compare_abap_doc - Write them in open_table and open_json_schema_for_table - Add parser and writer unit tests
Contributor
Control PanelHi, I'm an AI-powered Review Bot that helps you with summarizing and reviewing pull requests.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds support for the \` and \` ABAP Doc annotations on internal tables. These are emitted as \minItems` / \maxItems` constraints for array types in the generated JSON schema, analogous to the existing \minLength` / \maxLength` handling for strings.
Changes
zcl_aff_abap_doc_parser: added \min_items` / \max_items` annotation constants and result fields, included them in the description-boundary regex, and routed them through \parse_number_annotations`.zcl_aff_writer: extended \compare_abap_doc` to merge \min_items` / \max_items`.zcl_aff_writer_json_schema: emit \minItems` / \maxItems` in both \open_table` and \open_json_schema_for_table`.Tests