Skip to content

Commit

Permalink
Merge branch 'statsig-io-add-items-to-schema'
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jan 16, 2025
2 parents be819d1 + a970af8 commit 4257146
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 110 deletions.
25 changes: 19 additions & 6 deletions e2e/api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@
"title": "Page",
"format": "int32",
"default": 0,
"example": 123
"example": 123,
"type": "number"
}
},
{
Expand All @@ -645,7 +646,11 @@
"example": [
"sort1",
"sort2"
]
],
"type": "array",
"items": {
"type": "string"
}
}
},
{
Expand Down Expand Up @@ -692,23 +697,30 @@
"in": "query",
"required": true,
"schema": {
"type": "array"
"type": "array",
"items": {
"$ref": "#/components/schemas/LettersEnum"
}
}
},
{
"name": "letters",
"in": "query",
"required": true,
"schema": {
"type": "array"
"type": "array",
"items": {
"$ref": "#/components/schemas/Letter"
}
}
},
{
"name": "beforeDate",
"in": "query",
"required": true,
"schema": {
"format": "date-time"
"format": "date-time",
"type": "string"
}
},
{
Expand All @@ -724,7 +736,8 @@
"type": "number"
}
},
"additionalProperties": true
"additionalProperties": true,
"type": "object"
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions lib/services/swagger-types-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ type KeysToRemove =

export class SwaggerTypesMapper {
private readonly keysToRemove: Array<KeysToRemove> = [
'type',
'isArray',
'enum',
'enumName',
'enumSchema',
'items',
'$ref',
...this.getSchemaOptionsKeys()
];
Expand Down Expand Up @@ -146,7 +144,9 @@ export class SwaggerTypesMapper {
'default',
'example',
'oneOf',
'anyOf'
'anyOf',
'type',
'items'
];
}

Expand Down
134 changes: 33 additions & 101 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4257146

Please sign in to comment.