Skip to content

Commit 821dce9

Browse files
committed
chore(tests): add additional test case for underscore naming
As highlighted in #1767.
1 parent 8ea9351 commit 821dce9

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# yaml-language-server: $schema=../../../../configuration-schema.json
2+
package: issue1767
3+
generate:
4+
models: true
5+
output: issue1767.gen.go
6+
output-options:
7+
skip-prune: true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package issue1767
2+
3+
//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=config.yaml openapi.yaml

internal/test/issues/issue1767/issue1767.gen.go

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
openapi: "3.0.0"
2+
info:
3+
version: 1.0.0
4+
title: "An underscore in the name of a field is remapped to `Underscore`"
5+
paths:
6+
components:
7+
schemas:
8+
Alarm:
9+
description: |
10+
Alarm Information
11+
type: object
12+
properties:
13+
_id:
14+
description: Identifier of the Alarm.
15+
type: string
16+
format: uuid
17+
id:
18+
description: Identifier of the Alarm.
19+
type: string
20+
format: uuid

0 commit comments

Comments
 (0)