yaacov / crdtoapi

Use kubernetes CRD definitions to create OpenAPI schema file
Apache License 2.0
3 stars 1 forks source link

additionalProperties keyword is not supported #4

Closed rotty3000 closed 4 months ago

rotty3000 commented 4 months ago

CRDs may use the additionalProperties property to indicate that the property is a map (a.k.a. Dictionary, HashMap, Associative Array).

e.g.:

    settings:
      additionalProperties:
        type: string
      description: Provider settings.
      type: object

This means, the property settings is a map whose values are of type string.

Ref: Dictionaries, HashMaps and Associative Arrays

In TypeScript this should result in:

settings: {[key: string]: string}

PR forthcoming.

yaacov commented 4 months ago

https://www.npmjs.com/package/crdtoapi/v/0.0.17 :tada: :cake: