File tree Expand file tree Collapse file tree 2 files changed +51
-1
lines changed
src/main/groovy/com/github/hauner/openapi/spring/generatr/mapping Expand file tree Collapse file tree 2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ plugins {
77}
88
99group ' com.github.hauner.openapi'
10- version ' 0.1-SNAPSHOT '
10+ version ' 0.1.0.B1 '
1111
1212targetCompatibility = JavaVersion . VERSION_1_8
1313
@@ -24,6 +24,7 @@ check.dependsOn testInt
2424dependencies {
2525 implementation ' org.codehaus.groovy:groovy:2.5.4'
2626 implementation ' io.swagger.parser.v3:swagger-parser:2.0.12'
27+ implementation ' org.yaml:snakeyaml:1.25'
2728 compileOnly ' com.github.hauner.openapi:openapi-generatr-gradle:0.1-SNAPSHOT'
2829
2930 testImplementation (' org.spockframework:spock-core:1.3-groovy-2.5' ) {
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2019 the original authors
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package com.github.hauner.openapi.spring.generatr.mapping
18+
19+ /**
20+ * Used with {@link EndpointTypeMapping} to configure the java type that represents the schema of
21+ * the parameter of the endpoint.
22+ *
23+ * @author Martin Hauner
24+ */
25+ class ParameterTypeMapping {
26+
27+ /**
28+ * The parameter name of this mapping. Must match 1:1 with what is written in the api.
29+ */
30+ String parameterName
31+
32+ /**
33+ * The OpenAPI schema type that should be mapped to the {@link #targetTypeName} java type.
34+ */
35+ @Deprecated // use mapping
36+ String sourceTypeName
37+
38+ /**
39+ * The fully qualified java type name that will be used for {@link #parameterName}.
40+ */
41+ @Deprecated // use mapping
42+ String targetTypeName
43+
44+ /**
45+ * Type mapping valid only for requests with parameter {@link #parameterName}.
46+ */
47+ TypeMapping mapping
48+
49+ }
You can’t perform that action at this time.
0 commit comments