-
Notifications
You must be signed in to change notification settings - Fork 0
feat: API specs update for version latest #54
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66180,7 +66180,14 @@ | |
| { | ||
| "$ref": "#\/definitions\/providerRepositoryFrameworkList" | ||
| } | ||
| ] | ||
| ], | ||
| "x-discriminator": { | ||
| "propertyName": "type", | ||
| "mapping": { | ||
| "runtime": "#\/definitions\/providerRepositoryRuntimeList", | ||
| "framework": "#\/definitions\/providerRepositoryFrameworkList" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -71123,15 +71130,22 @@ | |
| "$ref": "#\/definitions\/providerRepositoryFramework" | ||
| }, | ||
| "x-example": "" | ||
| }, | ||
| "type": { | ||
| "type": "string", | ||
| "description": "Provider repository list type.", | ||
| "x-example": "framework" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "total", | ||
| "frameworkProviderRepositories" | ||
| "frameworkProviderRepositories", | ||
|
Comment on lines
71138
to
+71142
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Same issue as in the OpenAPI 3 spec: |
||
| "type" | ||
| ], | ||
| "example": { | ||
| "total": 5, | ||
| "frameworkProviderRepositories": "" | ||
| "frameworkProviderRepositories": "", | ||
| "type": "framework" | ||
| } | ||
| }, | ||
| "providerRepositoryRuntimeList": { | ||
|
|
@@ -71152,15 +71166,22 @@ | |
| "$ref": "#\/definitions\/providerRepositoryRuntime" | ||
| }, | ||
| "x-example": "" | ||
| }, | ||
| "type": { | ||
| "type": "string", | ||
| "description": "Provider repository list type.", | ||
| "x-example": "runtime" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "total", | ||
| "runtimeProviderRepositories" | ||
| "runtimeProviderRepositories", | ||
| "type" | ||
| ], | ||
| "example": { | ||
| "total": 5, | ||
| "runtimeProviderRepositories": "" | ||
| "runtimeProviderRepositories": "", | ||
| "type": "runtime" | ||
| } | ||
| }, | ||
| "branchList": { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enumon discriminator propertyThe
typefield in bothproviderRepositoryFrameworkListandproviderRepositoryRuntimeListis declared as a plainstringwith noenumconstraint. Since thediscriminator.mappingrelies on exactly"framework"and"runtime"as the valid values, a schema validator will accept any arbitrary string fortype(e.g."type": "foo") without error — defeating the intent of the discriminator. Addingenummakes the contract explicit and enables correct validation:The same applies to
providerRepositoryRuntimeList("enum": ["runtime"]).