Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,8 @@ public void setMapNumberTo(String mapNumberTo) {
}

public String toEnumVariableName(String name, String datatype) {
name = name.replace(".", "_DOT_");

if ("int".equals(datatype)) {
return "NUMBER_" + name.replace("-", "MINUS_");
}
Expand Down
33 changes: 33 additions & 0 deletions modules/openapi-generator/src/test/resources/3_0/enum_float.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
openapi: 3.0.0
info:
title: Sample API
description: API description in Markdown.
version: 1.0.0
paths:
/pony-sizes:
get:
summary: Returns all pony sizes.
description: Optional extended description in Markdown.
responses:
200:
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PonySizes'
components:
schemas:
PonySizes:
type: object
properties:
type:
$ref: '#/components/schemas/Type'
Type:
type: float
enum:
- 2.0
- 1.0
- 0.5
- 0.25
Loading