Temporary workaround: implementation of huma.Resolver/huma.ResolverWithPath interface.
2) Generated OAS doesn't have a Key schema.
InputBody:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/InputBody.json
format: uri
readOnly: true
type: string
values:
additionalProperties:
description: A value for a map.
maxLength: 32
minLength: 1
type: string
type: object
required:
- values
type: object
Value type is represented by additionalProperties.
Key may be represented by propertyNames like
...
values:
propertyNames:
type: string
maxLength: 10
minLength: 1
additionalProperties:
description: A value for a map.
maxLength: 32
minLength: 1
type: string
type: object
...
From what I've checked in the source code, propertyNames is not supported yet.
Could you please briefly describe what needs to be considered for the implementation in the source code ( if someone wants to contribute it )?
Hi there,
I have the following types
main.go
One parameter,
values,
is a map ofKey
andValue
.Key
andValue
have validation rules ( inTransfromSchema
).The issue.
1)
Key
validation doesn't work.main_test.go
Temporary workaround: implementation of
huma.Resolver/huma.ResolverWithPath
interface.2) Generated OAS doesn't have a
Key
schema.Value
type is represented byadditionalProperties
.Key
may be represented bypropertyNames
likeFrom what I've checked in the source code,
propertyNames
is not supported yet.Could you please briefly describe what needs to be considered for the implementation in the source code ( if someone wants to contribute it )?
Thank you.