aws-cloudformation / aws-cloudformation/cloudformation-cli

Export a REST API from API Gateway as OpenAPI3.0 does not support type null in models

Open
#808 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
336
Forks
172
Avg merge
3d 5m
Merged PRs (30d)
3

Description

from model (jsonschema):
```
"value":{
"oneOf":[
{
"type":"string"
},
{
"type":"integer"
},
{
"$ref":"https://apigateway.amazonaws.com/restapis/{RestApiId}/models/Emails"
},
{
"$ref":"https://apigateway.amazonaws.com/restapis/{RestApiId}/models/Phones"
},
{
"type":"integer"
},
{
"type":"null"
}
]
}
```
generated OpenAPI3.0:
```
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"$ref": "#/components/schemas/Emails"
},
{
"$ref": "#/components/schemas/Phones"
},
null
]
}
```

if the model includes:

```
"properties": {
"name": {
"description": "Tenant Name",
"type": ["string","null"]
}
}

```

documentation for this scheme is not generated at all

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.