Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update open-api config for spring boot 3 and jakarta validation #18

Merged
merged 2 commits into from
Feb 15, 2023
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
3 changes: 3 additions & 0 deletions docs/spec/generator-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ swaggerAnnotations: true
title: CodeCharacter Core API
useBeanValidation: true
useTags: true
useJakartaEe: true
springVersion: 3.0.0
useSpringBoot3: true
2 changes: 1 addition & 1 deletion library/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.2.1
6.3.0
11 changes: 2 additions & 9 deletions library/src/main/kotlin/delta/codecharacter/core/AuthApi.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -25,15 +25,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
11 changes: 2 additions & 9 deletions library/src/main/kotlin/delta/codecharacter/core/CodeApi.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -25,15 +25,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -24,15 +24,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -23,15 +23,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
11 changes: 2 additions & 9 deletions library/src/main/kotlin/delta/codecharacter/core/GameApi.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -19,15 +19,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -21,15 +21,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
11 changes: 2 additions & 9 deletions library/src/main/kotlin/delta/codecharacter/core/MapApi.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -26,15 +26,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
11 changes: 2 additions & 9 deletions library/src/main/kotlin/delta/codecharacter/core/MatchApi.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -22,15 +22,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -21,15 +21,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
11 changes: 2 additions & 9 deletions library/src/main/kotlin/delta/codecharacter/core/UserApi.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1).
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.3.0).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Expand All @@ -23,15 +23,8 @@ import org.springframework.validation.annotation.Validated
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.beans.factory.annotation.Autowired

import jakarta.validation.constraints.*
import jakarta.validation.Valid
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size

import kotlin.collections.List
import kotlin.collections.Map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@ package delta.codecharacter.dtos

import java.util.Objects
import com.fasterxml.jackson.annotation.JsonProperty
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size
import jakarta.validation.constraints.*
import jakarta.validation.Valid
import io.swagger.v3.oas.annotations.media.Schema

/**
* Activate user request
* @param token
* @param token
*/
data class ActivateUserRequestDto(

@Schema(example = "example-token", required = true, description = "")
@field:JsonProperty("token", required = true) val token: kotlin.String
@get:JsonProperty("token", required = true) val token: kotlin.String
) {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,22 @@ package delta.codecharacter.dtos
import java.util.Objects
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonValue
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size
import jakarta.validation.constraints.*
import jakarta.validation.Valid
import io.swagger.v3.oas.annotations.media.Schema

/**
*
* @param status
*
* @param status
*/
data class AuthStatusResponseDto(

@Schema(example = "null", description = "")
@field:JsonProperty("status") val status: AuthStatusResponseDto.Status? = null
@get:JsonProperty("status") val status: AuthStatusResponseDto.Status? = null
) {

/**
*
*
* Values: AUTHENTICATED,PROFILE_INCOMPLETE,ACTIVATION_PENDING
*/
enum class Status(val value: kotlin.String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@ package delta.codecharacter.dtos
import java.util.Objects
import com.fasterxml.jackson.annotation.JsonValue
import com.fasterxml.jackson.annotation.JsonProperty
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size
import jakarta.validation.constraints.*
import jakarta.validation.Valid
import io.swagger.v3.oas.annotations.media.Schema

/**
*
*
* Values: CODE,MAP
*/
enum class ChallengeTypeDto(val value: kotlin.String) {
Expand Down
22 changes: 8 additions & 14 deletions library/src/main/kotlin/delta/codecharacter/dtos/CodeDto.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,29 @@ package delta.codecharacter.dtos

import java.util.Objects
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonValue
import delta.codecharacter.dtos.LanguageDto
import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import jakarta.validation.constraints.Size
import jakarta.validation.constraints.*
import jakarta.validation.Valid
import io.swagger.v3.oas.annotations.media.Schema

/**
* Code model
* @param code
* @param lastSavedAt
* @param language
* @param code
* @param lastSavedAt
* @param language
*/
data class CodeDto(

@Schema(example = "#include <iostream>", required = true, description = "")
@field:JsonProperty("code", required = true) val code: kotlin.String,
@get:JsonProperty("code", required = true) val code: kotlin.String,

@Schema(example = "2021-01-01T00:00Z", required = true, description = "")
@field:JsonProperty("lastSavedAt", required = true) val lastSavedAt: java.time.Instant,
@get:JsonProperty("lastSavedAt", required = true) val lastSavedAt: java.time.Instant,

@field:Valid
@Schema(example = "null", required = true, description = "")
@field:JsonProperty("language", required = true) val language: LanguageDto
@get:JsonProperty("language", required = true) val language: LanguageDto
) {

}
Expand Down
Loading