-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
Moved to MoonwalkIssues that can be closed or migrated as being addressed in MoonwalkIssues that can be closed or migrated as being addressed in Moonwalk
Description
As of today, Open API spec asserts that a path parameter should always be required. This is a good assertion.
However, we have some services in Azure that have optional path parameters with a default value. There has been an increasing number of requests from service teams to support this.
What do you think about the following assertion?
If the parameter is in "path", required field must be specified. If required is false, it must be supported with a default. Else, required filed should be true.
This provides more flexibility apart from taking care of the current assertion.
For example:
- "/kevault/{KeyType}"
{
"name": "KeyType",
"in": "path",
"required": false,
"default": "symmetric",
"type": "string",
"description": "The type of key."
}
Can this be included in the 3.0 version of the Open API Spec?
Metadata
Metadata
Assignees
Labels
Moved to MoonwalkIssues that can be closed or migrated as being addressed in MoonwalkIssues that can be closed or migrated as being addressed in Moonwalk