Support OAS 3 - Operation Parameter Serialization for Complex Objects
See original GitHub issueOpenAPI 3.0 supports arrays and objects in operation parameters (path, query, header, and cookie) and lets you specify how these parameters should be serialized. The serialization method is defined by the style
and explode
keywords:
style
defines how multiple values are delimited. Possible styles depend on the parameter location – path, query, header or cookie.explode
(true/false) specifies whether arrays and objects should generate separate parameters for each array item or object property.
Details: https://swagger.io/docs/specification/serialization/
NSwag will need to understand when complex objects are in an operation parameter and apply the “Simple” style
and set explode
to “false” in the resultant spec. There will also need to be some configuration options for users to select different “style” and “explode” defaults.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Parameter Serialization
OAS 3 This guide is for OpenAPI 3.0. Parameter Serialization. Serialization means translating data structures or object state into a format that can...
Read more >OpenAPI Specification - Version 3.0.3
The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand ...
Read more >OpenAPI Tips - Query Parameters & Serialization
OpenAPI supports serialization of arrays and objects in all operation parameters (path, query, header, cookie). The serialization rules are based on a ...
Read more >OpenAPI Specification v3.1.0 | Introduction, Definitions, & ...
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs.
Read more >OpenAPI Specification v3.0.3 | Introduction, Definitions, & ...
Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am trying define a query parameter using a schema like so:
but when the C# client is built from this via an Open API service reference using the output is:
why is this only exploding the additional properties and doing so on the type rather than the parameter which doesn’t compile since the Request is not a static type?
ah, jeez, changing the name property to “name”: “request” fixes that.