mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 04:00:51 +00:00
[Kotlin]Formatted according to the kotlin style guide (#5196)
* Do not put a space https://kotlinlang.org/docs/reference/coding-conventions.html#horizontal-whitespace * Use 4 spaces for indentation https://kotlinlang.org/docs/reference/coding-conventions.html#formatting * Put spaces around the `=` sign https://kotlinlang.org/docs/reference/coding-conventions.html#method-call-formatting * Indent the expression body by 4 spaces https://kotlinlang.org/docs/reference/coding-conventions.html#expression-body-formatting * run ./bin/kotlin-springboot-petstore-all.sh
This commit is contained in:
parent
7d366ad6ac
commit
a6807a73e5
@ -5,7 +5,7 @@
|
||||
{{/vars}}
|
||||
*/{{#discriminator}}
|
||||
{{>typeInfoAnnotation}}{{/discriminator}}
|
||||
{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}data class {{classname}} (
|
||||
{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}data class {{classname}}(
|
||||
{{#requiredVars}}
|
||||
{{>dataClassReqVar}}{{^-last}},
|
||||
{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{#useBeanValidation}}{{#required}}
|
||||
{{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}}
|
||||
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}}
|
||||
@Deprecated(message=""){{/deprecated}}
|
||||
@Deprecated(message = ""){{/deprecated}}
|
||||
@JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}
|
@ -1 +1 @@
|
||||
4.2.2-SNAPSHOT
|
||||
4.3.0-SNAPSHOT
|
@ -16,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
data class Category (
|
||||
data class Category(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
@ -16,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param name Updated name of the pet
|
||||
* @param status Updated status of the pet
|
||||
*/
|
||||
data class InlineObject (
|
||||
data class InlineObject(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Updated name of the pet")
|
||||
@JsonProperty("name") val name: kotlin.String? = null,
|
||||
|
@ -16,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @param file file to upload
|
||||
*/
|
||||
data class InlineObject1 (
|
||||
data class InlineObject1(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Additional data to pass to server")
|
||||
@JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null,
|
||||
|
@ -17,7 +17,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param type
|
||||
* @param message
|
||||
*/
|
||||
data class ModelApiResponse (
|
||||
data class ModelApiResponse(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("code") val code: kotlin.Int? = null,
|
||||
|
@ -21,7 +21,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param status Order Status
|
||||
* @param complete
|
||||
*/
|
||||
data class Order (
|
||||
data class Order(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
@ -16,14 +16,14 @@ import io.swagger.annotations.ApiModelProperty
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
* @param id
|
||||
* @param category
|
||||
* @param name
|
||||
* @param photoUrls
|
||||
* @param id
|
||||
* @param category
|
||||
* @param tags
|
||||
* @param status pet status in the store
|
||||
*/
|
||||
data class Pet (
|
||||
data class Pet(
|
||||
|
||||
@get:NotNull
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
|
@ -16,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
data class Tag (
|
||||
data class Tag(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param phone
|
||||
* @param userStatus User Status
|
||||
*/
|
||||
data class User (
|
||||
data class User(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
@ -1 +1 @@
|
||||
4.2.2-SNAPSHOT
|
||||
4.3.0-SNAPSHOT
|
@ -16,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
data class Category (
|
||||
data class Category(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
@ -16,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param name Updated name of the pet
|
||||
* @param status Updated status of the pet
|
||||
*/
|
||||
data class InlineObject (
|
||||
data class InlineObject(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Updated name of the pet")
|
||||
@JsonProperty("name") val name: kotlin.String? = null,
|
||||
|
@ -16,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @param file file to upload
|
||||
*/
|
||||
data class InlineObject1 (
|
||||
data class InlineObject1(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Additional data to pass to server")
|
||||
@JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null,
|
||||
|
@ -17,7 +17,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param type
|
||||
* @param message
|
||||
*/
|
||||
data class ModelApiResponse (
|
||||
data class ModelApiResponse(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("code") val code: kotlin.Int? = null,
|
||||
|
@ -21,7 +21,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param status Order Status
|
||||
* @param complete
|
||||
*/
|
||||
data class Order (
|
||||
data class Order(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
@ -16,14 +16,14 @@ import io.swagger.annotations.ApiModelProperty
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
* @param id
|
||||
* @param category
|
||||
* @param name
|
||||
* @param photoUrls
|
||||
* @param id
|
||||
* @param category
|
||||
* @param tags
|
||||
* @param status pet status in the store
|
||||
*/
|
||||
data class Pet (
|
||||
data class Pet(
|
||||
|
||||
@get:NotNull
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
|
@ -16,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
data class Tag (
|
||||
data class Tag(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModelProperty
|
||||
* @param phone
|
||||
* @param userStatus User Status
|
||||
*/
|
||||
data class User (
|
||||
data class User(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user