Skip to content

Commit aeb131c

Browse files
authored
Merge pull request #644 from Azquelt/spec-fixes
Fix spec mistakes found in final readthrough
2 parents 187fdc8 + a3fe68d commit aeb131c

File tree

11 files changed

+31
-16
lines changed

11 files changed

+31
-16
lines changed

api/src/main/java/org/eclipse/microprofile/openapi/annotations/info/Info.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
* The summary of the API.
8080
*
8181
* @return the summary for the API
82-
**/
82+
* @since 4.0
83+
*/
8384
String summary() default "";
8485

8586
/**

api/src/main/java/org/eclipse/microprofile/openapi/annotations/info/License.java

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
* The license identifier used for the API.
4545
*
4646
* @return the identifier of the license
47+
* @since 4.0
4748
**/
4849
String identifier() default "";
4950

api/src/main/java/org/eclipse/microprofile/openapi/annotations/media/DependentRequired.java

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* properties with the names in {@link #requires()}.
2323
*
2424
* @see Schema#dependentRequired()
25+
* @since 4.0
2526
*/
2627
public @interface DependentRequired {
2728

api/src/main/java/org/eclipse/microprofile/openapi/annotations/media/DependentSchema.java

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* validate against {@link #schema()}.
2323
*
2424
* @see Schema#dependentSchemas()
25+
* @since 4.0
2526
*/
2627
public @interface DependentSchema {
2728

api/src/main/java/org/eclipse/microprofile/openapi/annotations/media/PatternProperty.java

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* which validate against {@link #schema()}.
2727
*
2828
* @see Schema#patternProperties()
29+
* @since 4.0
2930
*/
3031
@Target({})
3132
@Retention(RetentionPolicy.RUNTIME)

api/src/main/java/org/eclipse/microprofile/openapi/models/Components.java

+3
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ default Components callbacks(Map<String, Callback> callbacks) {
488488
* elsewhere in the OpenAPI document.
489489
*
490490
* @return a copy Map (potentially immutable) of path items
491+
* @since 4.0
491492
*/
492493
Map<String, PathItem> getPathItems();
493494

@@ -497,6 +498,7 @@ default Components callbacks(Map<String, Callback> callbacks) {
497498
*
498499
* @param pathItems
499500
* a map of path items
501+
* @since 4.0
500502
*/
501503
void setPathItems(Map<String, PathItem> pathItems);
502504

@@ -507,6 +509,7 @@ default Components callbacks(Map<String, Callback> callbacks) {
507509
* @param pathItems
508510
* a map of path items
509511
* @return the current Schema instance
512+
* @since 4.0
510513
*/
511514
default Components pathItems(Map<String, PathItem> pathItems) {
512515
setPathItems(pathItems);

api/src/main/java/org/eclipse/microprofile/openapi/models/info/Info.java

+3
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ default Info version(String version) {
204204
* Returns the summary of the exposed API from this Info instance.
205205
*
206206
* @return the summary of the exposed API
207+
* @since 4.0
207208
**/
208209
String getSummary();
209210

@@ -212,6 +213,7 @@ default Info version(String version) {
212213
*
213214
* @param summary
214215
* the summary of the exposed API
216+
* @since 4.0
215217
*/
216218
void setSummary(String summary);
217219

@@ -221,6 +223,7 @@ default Info version(String version) {
221223
* @param summary
222224
* the summary for the exposed API
223225
* @return this Info instance
226+
* @since 4.0
224227
*/
225228
default Info summary(String summary) {
226229
setSummary(summary);

api/src/main/java/org/eclipse/microprofile/openapi/models/info/License.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,16 @@ default License name(String name) {
5858
* Returns the license identifier for this License instance that is used for the API.
5959
*
6060
* @return the license identifier used for the API
61-
**/
61+
* @since 4.0
62+
*/
6263
String getIdentifier();
6364

6465
/**
6566
* Sets the license identifier for this License instance that is used for the API.
6667
*
6768
* @param identifier
6869
* the license identifier used for the API
70+
* @since 4.0
6971
*/
7072
void setIdentifier(String identifier);
7173

@@ -75,6 +77,7 @@ default License name(String name) {
7577
* @param identifier
7678
* the license identifier used for the API
7779
* @return this License instance
80+
* @since 4.0
7881
*/
7982
default License identifier(String identifier) {
8083
setIdentifier(identifier);

api/src/main/java/org/eclipse/microprofile/openapi/models/media/Schema.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
public interface Schema extends Extensible<Schema>, Constructible, Reference<Schema> {
4545

4646
/**
47-
* The values allowed for the in field.
47+
* The values allowed for the {@code type} field.
4848
*/
4949
enum SchemaType {
5050
INTEGER("integer"), NUMBER("number"), BOOLEAN("boolean"), STRING("string"), OBJECT("object"), ARRAY(
@@ -2063,6 +2063,7 @@ default Schema examples(List<Object> examples) {
20632063
* @param propertyName
20642064
* the property name
20652065
* @return the value of the named property, or {@code null} if a property with the given name is not set
2066+
* @since 4.0
20662067
*/
20672068
Object get(String propertyName);
20682069

@@ -2103,6 +2104,7 @@ default Schema examples(List<Object> examples) {
21032104
* @param value
21042105
* the value to set, or {@code null} to remove the property
21052106
* @return the current Schema instance
2107+
* @since 4.0
21062108
*/
21072109
Schema set(String propertyName, Object value);
21082110

@@ -2113,6 +2115,7 @@ default Schema examples(List<Object> examples) {
21132115
* into a {@code Map}.
21142116
*
21152117
* @return a {@code Map} of property names to their corresponding values
2118+
* @since 4.0
21162119
*/
21172120
Map<String, ?> getAll();
21182121

@@ -2124,6 +2127,7 @@ default Schema examples(List<Object> examples) {
21242127
* @param allProperties
21252128
* the properties to set. Each value in the map must be valid according to the rules in
21262129
* {@link #set(String, Object)}
2130+
* @since 4.0
21272131
*/
21282132
void setAll(Map<String, ?> allProperties);
21292133
}

spec/src/main/asciidoc/microprofile-openapi-spec.asciidoc

+9-13
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// limitations under the License.
1818
//
1919

20-
:authors: Arthur De Magalhaes (Spec Lead), Eric Wittmann, Anna Safonov, Matt Gill, Ivan Junckes Filho, Jérémie Bresson, Jana Manoharan, Rui Qi Wang, Tommy Wojtczak, Martin Smithson, Michael Edgar
20+
:authors: Arthur De Magalhaes (Spec Lead), Eric Wittmann, Anna Safonov, Matt Gill, Ivan Junckes Filho, Jérémie Bresson, Jana Manoharan, Rui Qi Wang, Tommy Wojtczak, Martin Smithson, Michael Edgar, Andrew Rouse
2121
:version-label!:
2222
:sectanchors:
2323
:doctype: book
@@ -211,7 +211,7 @@ library and wish to take advantage to the official MP OpenAPI interfaces.
211211

212212
==== Quick overview of annotations
213213

214-
The following annotations are found in the https://github.com/eclipse/microprofile-open-api/tree/master/api/src/main/java/org/eclipse/microprofile/openapi/annotations[org.eclipse.microprofile.openapi.annotations] package.
214+
The following annotations are found in the https://github.com/eclipse/microprofile-open-api/tree/main/api/src/main/java/org/eclipse/microprofile/openapi/annotations[org.eclipse.microprofile.openapi.annotations] package.
215215

216216
[cols="1,4"]
217217
|===
@@ -387,7 +387,7 @@ post:
387387
'*/*':
388388
schema:
389389
$ref: '#/components/schemas/User'
390-
required: true
390+
required: true
391391
responses:
392392
default:
393393
description: no description
@@ -461,7 +461,7 @@ public class ServersResource {
461461
.Output for Sample 1
462462
[source, yaml]
463463
----
464-
openapi: 3.0.2
464+
openapi: 3.1.0
465465
servers:
466466
- url: http://{var1}.definition1/{var2}
467467
description: definition server 1
@@ -614,18 +614,14 @@ maxItems = b`
614614
| `minProperties = a +
615615
maxProperties = b`
616616
| `@DecimalMax(value = a)` | `number` or `integer` | `maximum = a`
617-
| `@DecimalMax(value = a, exclusive = false)` | `number` or `integer` | `maximum = a +
618-
exclusiveMaximum = true`
617+
| `@DecimalMax(value = a, inclusive = false)` | `number` or `integer` | `exclusiveMaximum = a`
619618
| `@DecimalMin(value = a)` | `number` or `integer` | `minimum = a`
620-
| `@DecimalMin(value = a, exclusive = false)` | `number` or `integer` | `minimum = a +
621-
exclusiveMinimum = true`
619+
| `@DecimalMin(value = a, inclusive = false)` | `number` or `integer` | `exclusiveMinimum = a`
622620
| `@Max(a)` | `number` or `integer` | `maximum = a`
623621
| `@Min(a)` | `number` or `integer` | `minimum = a`
624-
| `@Negative` | `number` or `integer` | `maximum = 0 +
625-
exclusiveMaximum = true`
622+
| `@Negative` | `number` or `integer` | `exclusiveMaximum = 0`
626623
| `@NegativeOrZero` | `number` or `integer` | `maximum = 0`
627-
| `@Positive` | `number` or `integer` | `minimum = 0 +
628-
exclusiveMinimum = true`
624+
| `@Positive` | `number` or `integer` | `exclusiveMinimum = 0`
629625
| `@PositiveOrZero` | `number` or `integer` | `minimum = 0`
630626
|===
631627

@@ -656,7 +652,7 @@ This is in addition to the default locations defined by https://github.com/eclip
656652
=== Programming model
657653

658654
Application developers are able to provide OpenAPI elements via Java POJOs. The
659-
complete set of models are found in the https://github.com/eclipse/microprofile-open-api/tree/master/api/src/main/java/org/eclipse/microprofile/openapi/models[org.eclipse.microprofile.openapi.models] package.
655+
complete set of models are found in the https://github.com/eclipse/microprofile-open-api/tree/main/api/src/main/java/org/eclipse/microprofile/openapi/models[org.eclipse.microprofile.openapi.models] package.
660656

661657
==== OASFactory
662658

spec/src/main/asciidoc/release_notes.asciidoc

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ A full list of changes delivered in the 4.0 release can be found at link:https:/
4141
** New `Info` property: `summary` (https://github.com/eclipse/microprofile-open-api/issues/435[435])
4242
** New `License` property: `identifier` (https://github.com/eclipse/microprofile-open-api/issues/436[436])
4343
** New `Schema` properties: `booleanSchema`, `comment`, `constValue`, `contains`, `contentEncoding`, `contentMediaType`, `contentSchema`, `dependentRequired`, `dependentSchemas`, `elseSchema`, `examples`, `ifSchema`, `maxContains`, `minContains`, `patternProperties`, `prefixItems`, `propertyNames`, `schemaDialect`, `thenSchema`, `unevaluatedItems`, `unevaluatedProperties` (https://github.com/eclipse/microprofile-open-api/issues/584[584]), (https://github.com/eclipse/microprofile-open-api/issues/567[567])
44+
* New `Schema` methods for working with custom properties: `set(String, Object)`, `get(String)`, `setAll(Map<String, ?>)`, `getAll()` (https://github.com/eclipse/microprofile-open-api/issues/584[584])
4445
** New `Schema.SchemaType` enum value: `NULL` (https://github.com/eclipse/microprofile-open-api/issues/584[584])
4546
** New `SecuritySchema.Type` enum value: `MUTUALTLS` (https://github.com/eclipse/microprofile-open-api/issues/582[582])
4647
* Annotation API changes, reflecting changes in the OpenAPI v3.1 document format

0 commit comments

Comments
 (0)