chore: generate
This commit is contained in:
parent
6015084fa2
commit
df147b65fd
25 changed files with 971 additions and 708 deletions
|
|
@ -126,9 +126,9 @@ function requestBodyKey(spec: OpenApiSpec, body: unknown) {
|
|||
|
||||
function requestBodySchemaKind(spec: OpenApiSpec, schema: OpenApiSchema | undefined) {
|
||||
if (!schema) return ""
|
||||
const resolved = (schema.$ref ? spec.components?.schemas?.[schema.$ref.replace("#/components/schemas/", "")] : schema) as
|
||||
| OpenApiSchema
|
||||
| undefined
|
||||
const resolved = (
|
||||
schema.$ref ? spec.components?.schemas?.[schema.$ref.replace("#/components/schemas/", "")] : schema
|
||||
) as OpenApiSchema | undefined
|
||||
if (resolved?.properties) return "object"
|
||||
if (resolved?.anyOf ?? resolved?.oneOf ?? resolved?.allOf) return "object"
|
||||
return resolved?.type ?? schema.type ?? "inline"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue