Describe the feature
The one place where oRPC does not adhere to OpenAPI specification is complex parameters serialization.
From oRPC docs: https://orpc.dev/docs/openapi/bracket-notation
This way of serializing parameters is not OpenAPI compliant, is tool specific and not portable. OpenAPI parameter style deepObject can only handle one level of nesting.
The better way would be to use content application/json for complex parameters.
Example openapi schema(you can test it in https://editor.swagger.io):
openapi: 3.1.0
info:
version: ''
title: ''
paths:
/test:
get:
parameters:
- name: test
in: query
content:
application/json:
schema:
type: object
properties:
arr:
type: array
items:
type: number
num:
type: object
properties:
a:
type: string
b:
type: number
responses:
2XX:
description: hello
content:
application/json:
schema:
type: string
In this way we can define any complex parameters (objects inside object etc...) because it is just serialized as json and it would be fully OpenAPI compliant and portable.
Would be great for oRPC to generate such parameter definition for OpenAPI when it is a complex object.
References:
https://spec.openapis.org/oas/v3.1.2.html#fixed-fields-for-use-with-content
This feature request is for oRPC 2.0
Related: https://github.com/unnoq/orpc/issues/518
Additional information
Describe the feature
The one place where oRPC does not adhere to OpenAPI specification is complex parameters serialization.
From oRPC docs: https://orpc.dev/docs/openapi/bracket-notation
This way of serializing parameters is not OpenAPI compliant, is tool specific and not portable. OpenAPI parameter style
deepObjectcan only handle one level of nesting.The better way would be to use content
application/jsonfor complex parameters.Example openapi schema(you can test it in https://editor.swagger.io):
In this way we can define any complex parameters (objects inside object etc...) because it is just serialized as json and it would be fully OpenAPI compliant and portable.
Would be great for oRPC to generate such parameter definition for OpenAPI when it is a complex object.
References:
https://spec.openapis.org/oas/v3.1.2.html#fixed-fields-for-use-with-content
This feature request is for oRPC 2.0
Related: https://github.com/unnoq/orpc/issues/518
Additional information