Skip to content
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

Add array size validation to the openapi-generator C templates #40

Open
davidjwbbc opened this issue Sep 26, 2024 · 0 comments
Open

Add array size validation to the openapi-generator C templates #40

davidjwbbc opened this issue Sep 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@davidjwbbc
Copy link
Contributor

Description

Modify the mustache templates in open5gs-tools/openapi-generator-templates/c/ to add the following validation:

  1. Add validation to confirm that objects parsed from JSON that include arrays with minItems and/or maxItems set contain a valid number of items after parsing of the array is complete.
  2. Add validation when converting a modelled object to JSON to confirm that arrays contain at least minItems number of items if minItems is given for the array and no more than maxItems if maxItems is given for the array in the OpenAPI description. Conversion to JSON fails if an array does not contain a valid number of items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant