Closed olensmar closed 3 years ago
Ole and I discussed this briefly on a call and wanted to open a discussion to nail down how this should actually behave. Below I've compiled a small example that we can use as the basis for this discussion based on the different possible scenarios
---
# Global options defined but no path or operation has enabled/disabled option set
openapi: 3.0.1
x-kusk:
SOME_OPTIONS
paths:
/:
get: {}
post: {}
---
# Path has enabled = true but no enabled specified at operation level
openapi: 3.0.1
x-kusk:
SOME_OPTIONS
paths:
/:
x-kusk:
enabled: true
get: {}
post: {}
---
# Path has no enabled specified but some of the operations do
openapi: 3.0.1
x-kusk:
SOME_OPTIONS
paths:
/:
get:
x-kusk:
enabled: true
post: {}
# Question: Is an unspecified enabled option to be treated as an explicit enabled = false
We need to discuss what should happen in each of the scenarios above
Describe the enhancement you'd like to see I'd like to be able to hide all operations by default and only expose those that I want by specifying x-kust.enabled=true at the path or operation level. In this way I'm sure that any new operations I add to my OpenAPI definitions aren't exposed before they're ready
Scenarios
enabled
option to be treated as an explicit enabled = false and thus disable the whole path