Skip to content

Commit

Permalink
Merge pull request #87 from samchungy/enable-type-array
Browse files Browse the repository at this point in the history
Enable type array for schema object
  • Loading branch information
pjmolina authored Oct 6, 2022
2 parents e620d7e + 6c0f093 commit 4accda2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/model/OpenApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ export function isReferenceObject(obj: any): obj is ReferenceObject {
return Object.prototype.hasOwnProperty.call(obj, '$ref');
}

type SchemaObjectType = 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';

export interface SchemaObject extends ISpecificationExtension {
nullable?: boolean;
discriminator?: DiscriminatorObject;
Expand All @@ -278,7 +280,7 @@ export interface SchemaObject extends ISpecificationExtension {
examples?: any[];
deprecated?: boolean;

type?: 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
type?: SchemaObjectType | SchemaObjectType[];
format?:
| 'int32'
| 'int64'
Expand Down

0 comments on commit 4accda2

Please sign in to comment.