metadevpro / openapi3-ts

TS Model & utils for creating and exposing OpenAPI 3.x contracts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong types for SchemaObject.properties/.allOf/.oneOf/.anyOf ?

martinluetke opened this issue · comments

The swagger-schema-official implementation for Swagger 2.0 described .properties thus:

properties?: {[propertyName: string]: Schema};

Also .allOf, .oneOf, and .anyOf are lists.

Therefore I would expect their types to be:

allOf?: (SchemaObject | ReferenceObject)[];
oneOf?: (SchemaObject | ReferenceObject)[];
anyOf?: (SchemaObject | ReferenceObject)[];
properties?: {[propertyName: string]: (SchemaObject | ReferenceObject)};

Am I missing something?

Thanks for pointing out @martinluetke Fixed and published as version 0.3.1