-
Notifications
You must be signed in to change notification settings - Fork 299
Description
Is your feature request related to a problem? Please describe the problem.
In events where the OAS doesn't fully conform, we should be able to relax validation so generation can proceed. Considering many cases where you are not in a position to fix the underlying OAS, this would provide an escape hatch. In the following example, a path parameter is defined but isn't used, which throws an error:
OpenAPI error #/paths/~1/get/parameters/0/in - Declared path parameter "path" needs to be defined as a path parameter at either the path or operation level
Excluding this path doesn't seem to work, and subsequent command don't run because kiota returns a non-zero exit code after the above error. So the only option left is to just swallow the exit-code so we can continue on
"/": {
"get": {
"tags": [
"StaticResource"
],
"parameters": [
{
"name": "path",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},Client library/SDK language
C#
Describe the solution you'd like
I'd like the --exclude-path flag to skip validation on OAS endpoints I don't care to generate anyway, or some kind of CLI flag that ignores OAS validation issues.
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status