Added a required field to the literal_query_param object so that the SchemaBuilder can correctly parse the required property value for a query parameter when calling the __convert_literal_component_param helper function.
Expected Benefits
Should fix the bug where the required tag is not marked correctly for query_params (#215)
Expect:
userId and locationId should be marked as required
Result:
Additional Notes:
The required field is optional for query parameters and its default value is false. Query parameters should only be marked as required if the required property is explicitly set to true
Changes Made
Added a
required
field to theliteral_query_param
object so that theSchemaBuilder
can correctly parse therequired
property value for a query parameter when calling the__convert_literal_component_param
helper function.Expected Benefits
Should fix the bug where the required tag is not marked correctly for query_params (#215)
New output w/ changes
Given:
Expect:
userId
andlocationId
should be marked as requiredResult:
Additional Notes:
The
required
field is optional for query parameters and its default value isfalse
. Query parameters should only be marked as required if therequired
property is explicitly set totrue
Context: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.1.md#parameter-objec