forked from loafle/openapi-generator-original
[Kotlin][Bug] Added open, external and internal as reserved keywords for kotlin (#9842)
* Added open, external and internal as reserved keywords for kotlin * ./bin/generate-samples.sh ./bin/utils/export_docs_generators.sh with only kotlin
This commit is contained in:
parent
f0cbfbc820
commit
147367e559
@ -80,15 +80,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>continue</li>
|
||||
<li>do</li>
|
||||
<li>else</li>
|
||||
<li>external</li>
|
||||
<li>false</li>
|
||||
<li>for</li>
|
||||
<li>fun</li>
|
||||
<li>if</li>
|
||||
<li>in</li>
|
||||
<li>interface</li>
|
||||
<li>internal</li>
|
||||
<li>is</li>
|
||||
<li>null</li>
|
||||
<li>object</li>
|
||||
<li>open</li>
|
||||
<li>package</li>
|
||||
<li>return</li>
|
||||
<li>super</li>
|
||||
|
@ -82,15 +82,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>continue</li>
|
||||
<li>do</li>
|
||||
<li>else</li>
|
||||
<li>external</li>
|
||||
<li>false</li>
|
||||
<li>for</li>
|
||||
<li>fun</li>
|
||||
<li>if</li>
|
||||
<li>in</li>
|
||||
<li>interface</li>
|
||||
<li>internal</li>
|
||||
<li>is</li>
|
||||
<li>null</li>
|
||||
<li>object</li>
|
||||
<li>open</li>
|
||||
<li>package</li>
|
||||
<li>return</li>
|
||||
<li>super</li>
|
||||
|
@ -93,15 +93,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>continue</li>
|
||||
<li>do</li>
|
||||
<li>else</li>
|
||||
<li>external</li>
|
||||
<li>false</li>
|
||||
<li>for</li>
|
||||
<li>fun</li>
|
||||
<li>if</li>
|
||||
<li>in</li>
|
||||
<li>interface</li>
|
||||
<li>internal</li>
|
||||
<li>is</li>
|
||||
<li>null</li>
|
||||
<li>object</li>
|
||||
<li>open</li>
|
||||
<li>package</li>
|
||||
<li>return</li>
|
||||
<li>super</li>
|
||||
|
@ -74,15 +74,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>continue</li>
|
||||
<li>do</li>
|
||||
<li>else</li>
|
||||
<li>external</li>
|
||||
<li>false</li>
|
||||
<li>for</li>
|
||||
<li>fun</li>
|
||||
<li>if</li>
|
||||
<li>in</li>
|
||||
<li>interface</li>
|
||||
<li>internal</li>
|
||||
<li>is</li>
|
||||
<li>null</li>
|
||||
<li>object</li>
|
||||
<li>open</li>
|
||||
<li>package</li>
|
||||
<li>return</li>
|
||||
<li>super</li>
|
||||
|
@ -84,15 +84,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>continue</li>
|
||||
<li>do</li>
|
||||
<li>else</li>
|
||||
<li>external</li>
|
||||
<li>false</li>
|
||||
<li>for</li>
|
||||
<li>fun</li>
|
||||
<li>if</li>
|
||||
<li>in</li>
|
||||
<li>interface</li>
|
||||
<li>internal</li>
|
||||
<li>is</li>
|
||||
<li>null</li>
|
||||
<li>object</li>
|
||||
<li>open</li>
|
||||
<li>package</li>
|
||||
<li>return</li>
|
||||
<li>super</li>
|
||||
|
@ -125,7 +125,10 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
"val",
|
||||
"var",
|
||||
"when",
|
||||
"while"
|
||||
"while",
|
||||
"open",
|
||||
"external",
|
||||
"internal"
|
||||
));
|
||||
|
||||
defaultIncludes = new HashSet<String>(Arrays.asList(
|
||||
|
@ -48,7 +48,10 @@ public class KotlinReservedWordsTest {
|
||||
{"val"},
|
||||
{"var"},
|
||||
{"when"},
|
||||
{"while"}
|
||||
{"while"},
|
||||
{"open"},
|
||||
{"external"},
|
||||
{"internal"}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -120,6 +120,18 @@ paths:
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
- name: open
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
- name: external
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
- name: internal
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
$ref: "#/components/schemas/Good"
|
||||
@ -186,6 +198,12 @@ components:
|
||||
type: string
|
||||
while:
|
||||
type: string
|
||||
open:
|
||||
type: string
|
||||
external:
|
||||
type: string
|
||||
internal:
|
||||
type: string
|
||||
linked:
|
||||
$ref: '#/components/schemas/Linked'
|
||||
|
||||
@ -249,7 +267,12 @@ components:
|
||||
$ref: '#/components/schemas/when'
|
||||
while:
|
||||
$ref: '#/components/schemas/while'
|
||||
|
||||
open:
|
||||
$ref: '#/components/schemas/open'
|
||||
external:
|
||||
$ref: '#/components/schemas/external'
|
||||
internal:
|
||||
$ref: '#/components/schemas/internal'
|
||||
as:
|
||||
title: Testing reserved word 'as'
|
||||
type: object
|
||||
@ -469,6 +492,30 @@ components:
|
||||
while:
|
||||
title: Testing reserved word 'while'
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
open:
|
||||
title: Testing reserved word 'open'
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
external:
|
||||
title: Testing reserved word 'external'
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
internal:
|
||||
title: Testing reserved word 'internal'
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
|
Loading…
x
Reference in New Issue
Block a user