-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[scala][client] add Scala code generation test (#3859)
* [scala][client] add Scala reserved words test * fix filesystem path in [ScalaAkkaClientCodegenTest] * add additional reserved words in scala_reserved_words.yaml * ScalaAkkaClientCodegenTest: set mainPackage * scala_reserved_words.yaml: declare 'required' fields * rename test method * tweak test description
- Loading branch information
Showing
2 changed files
with
139 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
modules/openapi-generator/src/test/resources/3_0/scala_reserved_words.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: ping some object | ||
version: '1.0' | ||
servers: | ||
- url: 'http://localhost:8082/' | ||
paths: | ||
/ping: | ||
post: | ||
operationId: postPing | ||
tags: | ||
- ping | ||
requestBody: | ||
content: | ||
'application/json': | ||
schema: | ||
$ref: "#/components/schemas/SomeObj" | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
'application/json': | ||
schema: | ||
$ref: "#/components/schemas/SomeObj" | ||
components: | ||
schemas: | ||
SomeObj: | ||
type: object | ||
properties: | ||
$_type: | ||
type: string | ||
# using 'enum' & 'default' for '$_type' is a work-around until constants are supported | ||
# See https://github.com/OAI/OpenAPI-Specification/issues/1313 | ||
enum: | ||
- SomeObjIdentifier | ||
default: SomeObjIdentifier | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
val: | ||
type: string | ||
var: | ||
type: string | ||
class: | ||
type: string | ||
trait: | ||
type: string | ||
object: | ||
type: string | ||
try: | ||
type: string | ||
catch: | ||
type: string | ||
finally: | ||
type: string | ||
def: | ||
type: string | ||
for: | ||
type: string | ||
implicit: | ||
type: string | ||
match: | ||
type: string | ||
case: | ||
type: string | ||
import: | ||
type: string | ||
lazy: | ||
type: string | ||
private: | ||
type: string | ||
type: | ||
type: string | ||
foobar: | ||
type: boolean | ||
required: | ||
- id | ||
- try | ||
- catch | ||
- finally | ||
- lazy | ||
- foobar |