Skip to content

feat: update schema specification with JSON schema validation #122

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

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

kklimonda-cl
Copy link
Contributor

Description

A new schema for API specifications, along with JSON schema files that can
be used to validate specification, and runtime conversion of new schema
to the old one to avoid large changes across our codegen templates.

Motivation and Context

Existing specification had some edge cases that made writing codegen more complicated:

  • maps were used as lists making every object not self-contained
  • parameters that were objects had no type
  • it was possible to access any parameter data without checking if it is valid for the given parameter type (eg. checking items type for simple specs)
  • validation rules for parameters, locations, entries were flattened into the parent objects
  • golang templates were directly referenced in entries

New schema solves those and some other issues, and removes codegen-level data (like NameVariants) that will be implemented in the Sdk and Terraform marshallers.

How Has This Been Tested?

Screenshots (if appropriate)

Types of changes

  • New feature (non-breaking change which adds functionality)

@kklimonda-cl kklimonda-cl force-pushed the feat-updated-yaml-spec branch 6 times, most recently from b00f922 to 97d0198 Compare July 29, 2024 15:22
@kklimonda-cl kklimonda-cl linked an issue Jul 29, 2024 that may be closed by this pull request
@kklimonda-cl kklimonda-cl force-pushed the feat-updated-yaml-spec branch from 97d0198 to 0151c62 Compare August 5, 2024 19:37
Base automatically changed from feat-render-resource-second-part to main August 8, 2024 12:53
@kklimonda-cl kklimonda-cl force-pushed the feat-updated-yaml-spec branch from 0151c62 to b870149 Compare August 8, 2024 13:37
@kklimonda-cl kklimonda-cl merged commit e3f2124 into main Aug 8, 2024
3 checks passed
@kklimonda-cl kklimonda-cl deleted the feat-updated-yaml-spec branch August 8, 2024 13:40
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.

Schema for Specification Files
2 participants