@team-supercharge/oasg 13.0.0-test-export-01191261.0 → 14.0.0-remove-instant-mapping-634c95c0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -12
- package/bin/oasg +11 -14
- package/config.schema.yml +3 -3
- package/package.json +2 -2
- package/targets/android/generate.sh +2 -2
- package/targets/android/generator-config.json +6 -1
- package/targets/android/templates/build.gradle.mustache +54 -21
- package/targets/android/templates/libraries/jvm-retrofit2/api.mustache +2 -10
- package/targets/android/templates/libraries/jvm-retrofit2/infrastructure/ApiClient.kt.mustache +354 -0
- package/targets/common.sh +0 -8
- package/targets/feign/generator-config.json +4 -11
- package/targets/feign/templates/beanValidation.mustache +2 -7
- package/targets/feign/templates/formParams.mustache +2 -1
- package/targets/feign/templates/libraries/spring-cloud/clientConfiguration.mustache +118 -0
- package/targets/feign/templates/libraries/spring-cloud/pom-sb3.mustache +16 -16
- package/targets/feign/templates/libraries/spring-cloud/pom.mustache +16 -16
- package/targets/feign-kotlin/generator-config.json +3 -13
- package/targets/feign-kotlin/templates/libraries/spring-cloud/pom-sb3.mustache +2 -1
- package/targets/flutter/generate.sh +0 -5
- package/targets/nestjs/generate.sh +1 -0
- package/targets/nestjs/generator-config.json +5 -0
- package/targets/nestjs/templates/api.service.mustache +1 -1
- package/targets/nestjs/templates/reorder-operations.js +1 -1
- package/targets/nestjs/templates/rewrite-path-parameters.js +2 -2
- package/targets/react/generator-config.json +14 -0
- package/targets/spring/generator-config.json +3 -9
- package/targets/spring/templates/libraries/spring-boot/pom-sb3.mustache +247 -0
- package/targets/spring/templates/libraries/spring-boot/pom.mustache +257 -0
- package/targets/spring-kotlin/generator-config.json +3 -7
- package/targets/spring-kotlin/templates/libraries/spring-boot/pom-sb3.mustache +0 -1
- package/targets/spring-kotlin/templates/libraries/spring-boot/pom.mustache +0 -1
- package/targets/.env +0 -3
- package/targets/feign-kotlin/templates/apiInterface.mustache +0 -108
- package/targets/feign-kotlin/templates/dataClassReqVar.mustache +0 -5
- package/targets/react-native/generator-config.json +0 -7
- package/targets/spring-kotlin/templates/dataClassReqVar.mustache +0 -5
- /package/targets/{react-native → react}/generate.sh +0 -0
- /package/targets/{react-native → react}/publish.sh +0 -0
@@ -1,108 +0,0 @@
|
|
1
|
-
{{! fix left in @RequestMapping }}
|
2
|
-
/**
|
3
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}).
|
4
|
-
* https://openapi-generator.tech
|
5
|
-
* Do not edit the class manually.
|
6
|
-
*/
|
7
|
-
package {{package}}
|
8
|
-
|
9
|
-
{{#imports}}import {{import}}
|
10
|
-
{{/imports}}
|
11
|
-
{{#swagger2AnnotationLibrary}}
|
12
|
-
import io.swagger.v3.oas.annotations.*
|
13
|
-
import io.swagger.v3.oas.annotations.enums.*
|
14
|
-
import io.swagger.v3.oas.annotations.media.*
|
15
|
-
import io.swagger.v3.oas.annotations.responses.*
|
16
|
-
import io.swagger.v3.oas.annotations.security.*
|
17
|
-
{{/swagger2AnnotationLibrary}}
|
18
|
-
{{#swagger1AnnotationLibrary}}
|
19
|
-
import io.swagger.annotations.Api
|
20
|
-
import io.swagger.annotations.ApiOperation
|
21
|
-
import io.swagger.annotations.ApiParam
|
22
|
-
import io.swagger.annotations.ApiResponse
|
23
|
-
import io.swagger.annotations.ApiResponses
|
24
|
-
import io.swagger.annotations.Authorization
|
25
|
-
import io.swagger.annotations.AuthorizationScope
|
26
|
-
{{/swagger1AnnotationLibrary}}
|
27
|
-
import org.springframework.http.HttpStatus
|
28
|
-
import org.springframework.http.MediaType
|
29
|
-
import org.springframework.http.ResponseEntity
|
30
|
-
|
31
|
-
import org.springframework.web.bind.annotation.*
|
32
|
-
{{#useBeanValidation}}
|
33
|
-
import org.springframework.validation.annotation.Validated
|
34
|
-
{{/useBeanValidation}}
|
35
|
-
import org.springframework.web.context.request.NativeWebRequest
|
36
|
-
import org.springframework.beans.factory.annotation.Autowired
|
37
|
-
|
38
|
-
{{#useBeanValidation}}
|
39
|
-
import {{javaxPackage}}.validation.constraints.DecimalMax
|
40
|
-
import {{javaxPackage}}.validation.constraints.DecimalMin
|
41
|
-
import {{javaxPackage}}.validation.constraints.Email
|
42
|
-
import {{javaxPackage}}.validation.constraints.Max
|
43
|
-
import {{javaxPackage}}.validation.constraints.Min
|
44
|
-
import {{javaxPackage}}.validation.constraints.NotNull
|
45
|
-
import {{javaxPackage}}.validation.constraints.Pattern
|
46
|
-
import {{javaxPackage}}.validation.constraints.Size
|
47
|
-
import {{javaxPackage}}.validation.Valid
|
48
|
-
{{/useBeanValidation}}
|
49
|
-
|
50
|
-
{{#reactive}}
|
51
|
-
import kotlinx.coroutines.flow.Flow
|
52
|
-
{{/reactive}}
|
53
|
-
import kotlin.collections.List
|
54
|
-
import kotlin.collections.Map
|
55
|
-
|
56
|
-
{{#useBeanValidation}}
|
57
|
-
@Validated
|
58
|
-
{{/useBeanValidation}}
|
59
|
-
{{#swagger1AnnotationLibrary}}
|
60
|
-
@Api(value = "{{{baseName}}}", description = "The {{{baseName}}} API")
|
61
|
-
{{/swagger1AnnotationLibrary}}
|
62
|
-
|
63
|
-
{{#operations}}
|
64
|
-
interface {{classname}} {
|
65
|
-
{{#isDelegate}}
|
66
|
-
|
67
|
-
fun getDelegate(): {{classname}}Delegate = object: {{classname}}Delegate {}
|
68
|
-
{{/isDelegate}}
|
69
|
-
{{#operation}}
|
70
|
-
|
71
|
-
{{#swagger2AnnotationLibrary}}
|
72
|
-
@Operation(
|
73
|
-
summary = "{{{summary}}}",
|
74
|
-
operationId = "{{{operationId}}}",
|
75
|
-
description = """{{{unescapedNotes}}}""",
|
76
|
-
responses = [{{#responses}}
|
77
|
-
ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = [Content(schema = Schema(implementation = {{{baseType}}}::class))]{{/baseType}}){{^-last}},{{/-last}}{{/responses}}
|
78
|
-
]{{#hasAuthMethods}},
|
79
|
-
security = [ {{#authMethods}}SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes = [ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} ]{{/isOAuth}}){{^-last}},{{/-last}}{{/authMethods}} ]{{/hasAuthMethods}}
|
80
|
-
){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}
|
81
|
-
@ApiOperation(
|
82
|
-
value = "{{{summary}}}",
|
83
|
-
nickname = "{{{operationId}}}",
|
84
|
-
notes = "{{{notes}}}"{{#returnBaseType}},
|
85
|
-
response = {{{.}}}::class{{/returnBaseType}}{{#returnContainer}},
|
86
|
-
responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}},
|
87
|
-
authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}}]{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}}]{{/hasAuthMethods}})
|
88
|
-
@ApiResponses(
|
89
|
-
value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}}, {{/-last}}{{/responses}}]){{/swagger1AnnotationLibrary}}
|
90
|
-
@RequestMapping(
|
91
|
-
method = [RequestMethod.{{httpMethod}}],
|
92
|
-
value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"]{{#singleContentTypes}}{{#hasProduces}},
|
93
|
-
produces = "{{{vendorExtensions.x-accepts}}}"{{/hasProduces}}{{#hasConsumes}},
|
94
|
-
consumes = "{{{vendorExtensions.x-content-type}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}},
|
95
|
-
produces = [{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}]{{/hasProduces}}{{#hasConsumes}},
|
96
|
-
consumes = [{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}]{{/hasConsumes}}{{/singleContentTypes}}
|
97
|
-
)
|
98
|
-
{{#reactive}}{{^isArray}}suspend {{/isArray}}{{/reactive}}fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}): ResponseEntity<{{>returnTypes}}>{{^skipDefaultInterface}} {
|
99
|
-
{{^isDelegate}}
|
100
|
-
return {{>returnValue}}
|
101
|
-
{{/isDelegate}}
|
102
|
-
{{#isDelegate}}
|
103
|
-
return getDelegate().{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}})
|
104
|
-
{{/isDelegate}}
|
105
|
-
}{{/skipDefaultInterface}}
|
106
|
-
{{/operation}}
|
107
|
-
}
|
108
|
-
{{/operations}}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
{{! generate required nullable properties as optional }}
|
2
|
-
{{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}
|
3
|
-
@Schema({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{.}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}
|
4
|
-
@ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{.}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}
|
5
|
-
@get:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInCamelCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}?{{/isReadOnly}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
{{! generate required nullable properties as optional }}
|
2
|
-
{{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}
|
3
|
-
@Schema({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{.}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}
|
4
|
-
@ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{.}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}
|
5
|
-
@get:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInCamelCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}?{{/isReadOnly}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}}
|
File without changes
|
File without changes
|