-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Phillip Kruger <phillip.kruger@gmail.com> (cherry picked from commit 409f61b)
- Loading branch information
1 parent
9347729
commit 9742a40
Showing
5 changed files
with
99 additions
and
21 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
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
24 changes: 24 additions & 0 deletions
24
...c/main/java/io/quarkus/smallrye/openapi/deployment/spi/IgnoreStaticDocumentBuildItem.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.quarkus.smallrye.openapi.deployment.spi; | ||
|
||
import java.util.regex.Pattern; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
/** | ||
* Ignore a static OpenAPI document included in extension and/or dependencies. Supports regular expressions. | ||
*/ | ||
public final class IgnoreStaticDocumentBuildItem extends MultiBuildItem { | ||
|
||
private Pattern urlIgnorePattern = null; | ||
|
||
/** | ||
* @param urlIgnorePattern pattern to ignore when scanning static documents | ||
*/ | ||
public IgnoreStaticDocumentBuildItem(String urlIgnorePattern) { | ||
this.urlIgnorePattern = Pattern.compile(urlIgnorePattern); | ||
} | ||
|
||
public Pattern getUrlIgnorePattern() { | ||
return this.urlIgnorePattern; | ||
} | ||
} |