Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): nullable array types in 3.1.x specs #19687

Merged
merged 7 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/configs/typescript-consolidated-nullable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
generatorName: typescript
outputDir: samples/client/others/typescript/builds/null-types-simple
inputSpec: modules/openapi-generator/src/test/resources/3_1/null-types-simple.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
openapi: 3.1.0
info:
title: ""
version: ""
components:
schemas:
WithNullableType:
type: object
required:
# This simplifies the output
- arrayDataOrNull
- stringDataOrNull
- oneofOrNull
properties:
arrayDataOrNull:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the broken part

items:
$ref: "#/components/schemas/SomeObject"
type:
- array
- 'null'
# This was working when this fixture was introduced,
# but we need to make sure we don't regress
stringDataOrNull:
type:
- string
- 'null'
# This was working when this fixture was introduced,
# but we need to make sure we don't regress
oneofOrNull:
oneOf:
- $ref: "#/components/schemas/SomeObject"
- type: 'null'
SomeObject:
type: object
properties:
data:
type: string

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

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

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

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

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

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

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

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

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

Loading
Loading