-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Add ability to set group specific operation extensions.
Fixed #1470
Showing
8 changed files
with
315 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
openapi-annotations/src/main/java/io/micronaut/openapi/annotation/OpenAPIGroups.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.micronaut.openapi.annotation; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import static java.lang.annotation.RetentionPolicy.SOURCE; | ||
|
||
/** | ||
* Allows {@link OpenAPIGroup} to be repeatable. | ||
* | ||
* @since 6.7.0 | ||
*/ | ||
@Documented | ||
@Retention(SOURCE) | ||
@Target({ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD}) | ||
public @interface OpenAPIGroups { | ||
|
||
/** | ||
* @return A group of {@link OpenAPIGroup} | ||
*/ | ||
OpenAPIGroup[] value() default {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
openapi/src/main/java/io/micronaut/openapi/visitor/group/GroupInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.micronaut.openapi.visitor.group; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import io.micronaut.core.annotation.Internal; | ||
|
||
@Internal | ||
public final class GroupInfo { | ||
|
||
private final String name; | ||
private final Map<CharSequence, Object> extensions = new HashMap<>(); | ||
|
||
public GroupInfo(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public Map<CharSequence, Object> getExtensions() { | ||
return extensions; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters