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

fix: Various JSON schema REST API export fix and enhancements #1788

Merged
merged 10 commits into from
Mar 10, 2021

Conversation

fgschwan
Copy link
Collaborator

@fgschwan fgschwan commented Feb 26, 2021

The aim for this PR is to change JSON schema generation to be able to generate examples by JSON schema using https://json-schema-faker.js.org/ . These examples should be

  1. valid according to JSON schema validation (https://www.jsonschemavalidator.net/ , https://json-schema-validator.herokuapp.com/)
  2. don't cause internal errors when yaml REST validation is used on them (that means that proto parsing and other internal processing should went ok and only KVScheduler.Validate can create validation errors)
  3. more accurate/beautiful (proto model annotation for IP addresses converted to JSON schema for better json schema validation and valid ip address example value generation)

There are some code dependencies to not yet merged PR #1787 , therefore this PR is based on the commits of that PR. That means that commits of both PRs are visible here.(rebased)

@fgschwan fgschwan force-pushed the json-schema-enhancements branch 2 times, most recently from c9363bb to d04592e Compare March 3, 2021 13:29
@fgschwan fgschwan changed the title WIP fix: Various JSON schema REST API export fix and enhancements fix: Various JSON schema REST API export fix and enhancements Mar 4, 2021
milanlenco
milanlenco previously approved these changes Mar 10, 2021
fgschwan added 10 commits March 10, 2021 15:00
Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
… tool (fixed wrong setting of additional properties in inner message-referencing fields)

Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
…proto models

Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
…d implemented proper json schema export according to new annotation possibilities

Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
@fgschwan fgschwan force-pushed the json-schema-enhancements branch from c83c55b to ffec426 Compare March 10, 2021 14:05
@fgschwan fgschwan changed the title fix: Various JSON schema REST API export fix and enhancements WIP fix: Various JSON schema REST API export fix and enhancements Mar 10, 2021
@fgschwan fgschwan changed the title WIP fix: Various JSON schema REST API export fix and enhancements fix: Various JSON schema REST API export fix and enhancements Mar 10, 2021
@milanlenco milanlenco merged commit d22fd15 into ligato:master Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants