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

Provides failing test for #1525 #1526

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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 internal/test/issues/issue-1525/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package: issue1525
generate:
models: true
output: issue1525.gen.go
3 changes: 3 additions & 0 deletions internal/test/issues/issue-1525/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package issue1525

//go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen --config=config.yaml spec.yaml
12 changes: 12 additions & 0 deletions internal/test/issues/issue-1525/issue1525.gen.go

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

25 changes: 25 additions & 0 deletions internal/test/issues/issue-1525/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
openapi: 3.0.0

paths:
thing:
get:
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/Thing"

components:
schemas:
String:
type: string
Thing:
type: object
properties:
x:
$ref: "#/components/schemas/String"
nullable: true
required:
- x