Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions specs/1.9.x/open-api3-1.9.x-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -66367,7 +66367,14 @@
{
"$ref": "#\/components\/schemas\/providerRepositoryFrameworkList"
}
]
],
"discriminator": {
"propertyName": "type",
"mapping": {
"runtime": "#\/components\/schemas\/providerRepositoryRuntimeList",
"framework": "#\/components\/schemas\/providerRepositoryFrameworkList"
}
}
}
}
}
Expand Down Expand Up @@ -71417,15 +71424,22 @@
"$ref": "#\/components\/schemas\/providerRepositoryFramework"
},
"x-example": ""
},
"type": {
"type": "string",
"description": "Provider repository list type.",
"x-example": "framework"
Comment on lines +71427 to +71431
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 type field missing enum constraint

The type discriminator field is defined as a plain string in both providerRepositoryFrameworkList and providerRepositoryRuntimeList, but the only valid values are "framework" and "runtime". Without an enum constraint, validators and code generators will accept any string, reducing the precision of the schema.

Suggested change
},
"type": {
"type": "string",
"description": "Provider repository list type.",
"x-example": "framework"
"type": {
"type": "string",
"description": "Provider repository list type.",
"enum": ["framework"],
"x-example": "framework"
}

The same applies to providerRepositoryRuntimeList's type field ("enum": ["runtime"]).

}
},
"required": [
"total",
"frameworkProviderRepositories"
"frameworkProviderRepositories",
"type"
],
"example": {
"total": 5,
"frameworkProviderRepositories": ""
"frameworkProviderRepositories": "",
"type": "framework"
}
},
"providerRepositoryRuntimeList": {
Expand All @@ -71445,15 +71459,22 @@
"$ref": "#\/components\/schemas\/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": {
Expand Down
31 changes: 26 additions & 5 deletions specs/1.9.x/swagger2-1.9.x-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -66180,7 +66180,14 @@
{
"$ref": "#\/definitions\/providerRepositoryFrameworkList"
}
]
],
"x-discriminator": {
"propertyName": "type",
"mapping": {
"runtime": "#\/definitions\/providerRepositoryRuntimeList",
"framework": "#\/definitions\/providerRepositoryFrameworkList"
}
}
}
}
},
Expand Down Expand Up @@ -71123,15 +71130,22 @@
"$ref": "#\/definitions\/providerRepositoryFramework"
},
"x-example": ""
},
"type": {
"type": "string",
"description": "Provider repository list type.",
"x-example": "framework"
}
},
"required": [
"total",
"frameworkProviderRepositories"
"frameworkProviderRepositories",
"type"
],
"example": {
"total": 5,
"frameworkProviderRepositories": ""
"frameworkProviderRepositories": "",
"type": "framework"
}
},
"providerRepositoryRuntimeList": {
Expand All @@ -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": {
Expand Down
Loading