Skip to content

Commit 0b9c895

Browse files
committed
Ignore baseline prior to 4.2.0 for two overridden Schema methods
Add `BaselineIgnore` annotation to Schema methods addExtension and extensions for versions prior to 4.2.0. These methods were added/overridden in Schema from Extensible to refine/clarify specific details about how they behave on Schema. This is required because the bnd-baseline Maven plugin believes these methods to be breaking API changes due to the change of return type from a generic type in `Extensible` to `Schema` in the overrides. Signed-off-by: Michael Edgar <michael@xlate.io>
1 parent 2a99c73 commit 0b9c895

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

api/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
<artifactId>osgi.annotation</artifactId>
3434
<scope>provided</scope>
3535
</dependency>
36+
<dependency>
37+
<groupId>biz.aQute.bnd</groupId>
38+
<artifactId>biz.aQute.bnd.annotation</artifactId>
39+
<version>7.0.0</version>
40+
<scope>provided</scope>
41+
</dependency>
3642
</dependencies>
3743

3844
<build>

api/src/main/java/module-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@
5252

5353
// Required for compilation, not used at runtime
5454
requires static osgi.annotation;
55-
55+
requires static biz.aQute.bnd.annotation;
5656
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,7 @@ default Schema examples(List<Object> examples) {
21672167
* @see <a href="#schema-extensions">Schema Extensions</a>
21682168
*/
21692169
@Override
2170+
@aQute.bnd.annotation.baseline.BaselineIgnore("4.2.0")
21702171
default Schema extensions(Map<String, Object> extensions) {
21712172
return Extensible.super.extensions(extensions);
21722173
}
@@ -2184,6 +2185,7 @@ default Schema extensions(Map<String, Object> extensions) {
21842185
* @see <a href="#schema-extensions">Schema Extensions</a>
21852186
*/
21862187
@Override
2188+
@aQute.bnd.annotation.baseline.BaselineIgnore("4.2.0")
21872189
Schema addExtension(String name, Object value);
21882190

21892191
/**

0 commit comments

Comments
 (0)