File tree 10 files changed +40
-1
lines changed
openapi-processor-core/src
main/kotlin/io/openapiprocessor/core
groovy/io/openapiprocessor/core/writer/java
kotlin/io/openapiprocessor/core/support
openapi-processor-core-parser-api/src/main/kotlin/io/openapiprocessor/core/parser
openapi-processor-core-parser-openapi4j/src/main/kotlin/io/openapiprocessor/core/parser/openapi4j
openapi-processor-core-parser-swagger/src/main/kotlin/io/openapiprocessor/core/parser/swagger
10 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 1
1
[versions ]
2
2
processor = " 2025.3-SNAPSHOT"
3
- parser = " 2025.2 "
3
+ parser = " 2025.3-SNAPSHOT "
4
4
api = " 2024.2"
5
5
6
6
kotlin = " 2.1.20"
Original file line number Diff line number Diff line change 5
5
6
6
package io.openapiprocessor.core.parser
7
7
8
+ import java.net.URI
9
+
8
10
/* *
9
11
* OpenAPI Schema abstraction.
10
12
*/
@@ -65,4 +67,6 @@ interface Schema {
65
67
val extensions: Map <String , * >
66
68
67
69
val title: String?
70
+
71
+ val documentUri: URI
68
72
}
Original file line number Diff line number Diff line change 5
5
6
6
package io.openapiprocessor.core.parser.openapi4j
7
7
8
+ import java.net.URI
8
9
import io.openapiprocessor.core.parser.Schema as ParserSchema
9
10
import org.openapi4j.parser.model.v3.Schema as O4jSchema
10
11
@@ -128,4 +129,7 @@ class Schema(val schema: O4jSchema) : ParserSchema {
128
129
129
130
override val title: String?
130
131
get() = schema.title
132
+
133
+ override val documentUri: URI
134
+ get() = TODO (" deriving the package name from the document location is not supported with the openapi4j parser." )
131
135
}
Original file line number Diff line number Diff line change 6
6
package io.openapiprocessor.core.parser.swagger
7
7
8
8
import io.swagger.v3.oas.models.SpecVersion
9
+ import java.net.URI
9
10
import io.openapiprocessor.core.parser.Schema as ParserSchema
10
11
import io.swagger.v3.oas.models.media.ComposedSchema as SwaggerComposedSchema
11
12
import io.swagger.v3.oas.models.media.Schema as SwaggerSchema
@@ -153,4 +154,7 @@ class Schema(private val schema: SwaggerSchema<*>): ParserSchema {
153
154
154
155
override val title: String?
155
156
get() = schema.title
157
+
158
+ override val documentUri: URI
159
+ get() = TODO (" deriving the package name from the document location is not supported with the swagger parser." )
156
160
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import io.openapiprocessor.core.model.datatypes.DataTypeConstraints
10
10
import io.openapiprocessor.core.parser.HttpMethod
11
11
import io.openapiprocessor.core.parser.Schema
12
12
import io.openapiprocessor.core.support.capitalizeFirstChar
13
+ import java.net.URI
13
14
import io.openapiprocessor.core.parser.RefResolver as ParserRefResolver
14
15
15
16
/* *
@@ -444,4 +445,8 @@ open class SchemaInfo(
444
445
private fun getNestedTypeName (nestedName : String ): String {
445
446
return name + nestedName.capitalizeFirstChar()
446
447
}
448
+
449
+ fun getDocumentUri (): URI {
450
+ return schema.documentUri
451
+ }
447
452
}
Original file line number Diff line number Diff line change 5
5
6
6
package io.openapiprocessor.core.parser
7
7
8
+ import java.net.URI
9
+
8
10
object NullSchema: Schema {
9
11
10
12
override fun getType (): String? {
@@ -108,4 +110,7 @@ object NullSchema: Schema {
108
110
109
111
override val title: String?
110
112
get() = null
113
+
114
+ override val documentUri: URI
115
+ get() = URI .create(" should/not/be/called" )
111
116
}
Original file line number Diff line number Diff line change 5
5
6
6
package io.openapiprocessor.core.parser.openapi.v30
7
7
8
+ import java.net.URI
8
9
import io.openapiparser.model.v30.Schema as Schema30
9
10
import io.openapiprocessor.core.parser.Schema as ParserSchema
10
11
@@ -157,4 +158,7 @@ class Schema(val schema: Schema30) : ParserSchema {
157
158
158
159
override val title: String?
159
160
get() = schema.title
161
+
162
+ override val documentUri: URI
163
+ get() = schema.documentUri
160
164
}
Original file line number Diff line number Diff line change 5
5
6
6
package io.openapiprocessor.core.parser.openapi.v31
7
7
8
+ import java.net.URI
8
9
import io.openapiparser.model.v31.Schema as Schema31
9
10
import io.openapiprocessor.core.parser.Schema as ParserSchema
10
11
@@ -159,4 +160,7 @@ class Schema(val schema: Schema31) : ParserSchema {
159
160
160
161
override val title: String?
161
162
get() = schema.title
163
+
164
+ override val documentUri: URI
165
+ get() = schema.documentUri
162
166
}
Original file line number Diff line number Diff line change @@ -83,4 +83,9 @@ class TestSchema implements Schema {
83
83
String getTitle () {
84
84
return null
85
85
}
86
+
87
+ @Override
88
+ URI getDocumentUri () {
89
+ return URI . create(" null" )
90
+ }
86
91
}
Original file line number Diff line number Diff line change 6
6
package io.openapiprocessor.core.support
7
7
8
8
import io.openapiprocessor.core.parser.Schema
9
+ import java.net.URI
9
10
import io.openapiprocessor.core.parser.Schema as ParserSchema
10
11
11
12
/* *
@@ -117,4 +118,7 @@ class Schema(
117
118
118
119
override val title: String?
119
120
get() = TODO (" Not yet implemented" )
121
+
122
+ override val documentUri: URI
123
+ get() = TODO (" Not yet implemented" )
120
124
}
You can’t perform that action at this time.
0 commit comments