You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: openapi-parser/README.adoc
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@
6
6
7
7
**work in progress**
8
8
9
-
It is usable, but has the following limitations at the moment:
9
+
It is usable but has the following limitations at the moment:
10
10
11
11
* it does support most but not all OpenAPI object properties
12
12
* minimal documentation (just this README)
13
13
14
-
source code gifts (i.e. pull requests) are welcome :-)
14
+
source code gifts (i.e., pull requests) are welcome :-)
15
15
16
-
== openapi-parser & validator
16
+
== openapi-parser and validator
17
17
18
18
a Java 11 based link:{openapi}[OpenAPI] 3.2, 3.1 & 3.0 parser with validation, bundling & overlay support and pluggable document reader & json/yaml converter.
19
19
@@ -23,8 +23,9 @@ a Java 11 based link:{openapi}[OpenAPI] 3.2, 3.1 & 3.0 parser with validation, b
23
23
** JSON schema draft-2020-12 validation of OpenAPI 3.2, 3.1
24
24
* separate apis for OpenAPI 3.2, 3.1 & 3.0
25
25
* easily get resolved $ref object
26
-
* bundle & write (single file) OpenAPI document
27
-
* apply overlay to (bundled) OpenAPI document (experimental)
26
+
* bundle and write (a single file) OpenAPI document
27
+
* apply overlay to (a bundled) OpenAPI document (experimental)
28
+
** requires `com.jayway.jsonpath:json-path:2.10.0` or newer
28
29
* minimal dependencies
29
30
* pluggable document reader
30
31
* pluggable json/yaml converter
@@ -36,11 +37,11 @@ the parser tries to provide a *user-friendly* api in the sense that it
36
37
37
38
* minimizes *null* values where possible
38
39
* throws if *required* properties are not set
39
-
* it is *readonly*
40
-
* it resolves `$ref` objects, i.e. $ref objects have a `getRefObject()`
40
+
* it is *read-only*
41
+
* it resolves `$ref` objects, i.e., $ref objects have a `getRefObject()`
41
42
* it is very close to the specification (OpenAPI 3.2, 3.1 & 3.0)
42
43
43
-
Drawback is, that with the current api it is not possible (for some properties) to detect if a property is set in the OpenAPI description or if it is not given.
44
+
The drawback is that with the current api it is not possible (for some properties) to detect if a property is set in the OpenAPI description or if it is not given.
44
45
45
46
=== raw api
46
47
@@ -73,22 +74,22 @@ or to create a new api `model.v30r.OpenApi` with a `@Nullable` signature
73
74
74
75
Minimizing null values means that
75
76
76
-
- for a missing/optional array properties it will return an empty collection
77
-
- for other missing/optional properties it will return the default value if any is specified by the OpenAPI specification
77
+
- for a missing/optional array property, it will return an empty collection
78
+
- for other missing/optional properties, it will return the default value if any is specified by the OpenAPI specification
78
79
79
-
For example the `required` property of a `parameter` has a `false` default value and the api will return false in case `required` is not explicitly set in the OpenAPI description.
80
+
For example, the `required` property of a `parameter` has a `false` default value and the api will return false in case `required` is not explicitly set in the OpenAPI description.
80
81
81
82
=== yaml/json converter
82
83
83
-
the *parser* is internally using `Map<String, Object>` to represent the OpenAPI object tree to be independent of a specific yaml/json parser. It will work with any yaml/json parser that is able to convert an OpenAPI YAML or JSON to a `Map<String, Object>` object tree.
84
+
The *parser* is internally using `Map<String, Object>` to represent the OpenAPI object tree to be independent of a specific yaml/json parser. It will work with any yaml/json parser that is able to convert an OpenAPI YAML or JSON to a `Map<String, Object>` object tree.
84
85
85
-
link:{converter-jackson}[`io-jackson`] provides a default implementation that is based on jackson.
86
+
link:{converter-jackson}[`io-jackson`] provides a default implementation based on jackson.
86
87
87
88
== usage
88
89
89
90
=== current api (since 2023.3)
90
91
91
-
this removes the `Resolver` from the previous (i.e. 2023.2) setup at step 2.
92
+
this removes the `Resolver` from the previous (i.e., 2023.2) setup at step 2.
92
93
93
94
The following link:{sample}[sample code] shows the usage of the current api.
0 commit comments