Skip to content

Commit

Permalink
Merge branch 'main' into add-server-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesarnal committed Nov 22, 2023
2 parents 1a0cf2e + 9451de8 commit 3513a7d
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 13 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@
"contributions": [
"doc"
]
},
{
"login": "gabriel-farache",
"name": "gabriel-farache",
"avatar_url": "https://avatars.githubusercontent.com/u/3036508?v=4",
"profile": "https://github.com/gabriel-farache",
"contributions": [
"code",
"test"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 1 addition & 1 deletion .github/project.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
release:
current-version: 2.2.13
current-version: 2.2.14
next-version: 3.0.0-SNAPSHOT
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ jobs:
run: mvn '-Dorg.slf4j.simpleLogger.log.org.openapitools=off' -B formatter:validate impsort:check verify --file pom.xml

- name: Store PR id
if: github.event_name == 'pull_request'
run: |
echo ${{ github.event.number }} > ./client/docs/target/generated-docs/pr-id.txt
- name: Publishing directory for PR preview
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: site
Expand Down Expand Up @@ -86,12 +88,14 @@ jobs:
run: mvn -Presteasy-reactive '-Dorg.slf4j.simpleLogger.log.org.openapitools=off' -B formatter:validate impsort:check verify --file pom.xml

- name: Store PR id
if: github.event_name == 'pull_request'
run: |
echo ${{ github.event.number }} > ./client/docs/target/generated-docs/pr-id.txt
- name: Publishing directory for PR preview
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: site
path: ./client/docs/target/generated-docs
retention-days: 3
retention-days: 3
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Quarkus - OpenAPI Generator

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-28-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-29-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![Build](<https://img.shields.io/github/actions/workflow/status/quarkiverse/quarkus-openapi-generator/build.yml?branch=main&logo=GitHub&style=flat-square>)](https://github.com/quarkiverse/quarkus-openapi-generator/actions?query=workflow%3ABuild)
[![Maven Central](https://img.shields.io/maven-central/v/io.quarkiverse.openapi.generator/quarkus-openapi-generator.svg?label=Maven%20Central&style=flat-square)](https://search.maven.org/artifact/io.quarkiverse.openapi.generator/quarkus-openapi-generator)
Expand Down Expand Up @@ -73,6 +73,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/DennisGyldendahlJensenSparNord"><img src="https://avatars.githubusercontent.com/u/135703683?v=4?s=100" width="100px;" alt="DennisGyldendahlJensenSparNord"/><br /><sub><b>DennisGyldendahlJensenSparNord</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=DennisGyldendahlJensenSparNord" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/luanbrdev"><img src="https://avatars.githubusercontent.com/u/144866036?v=4?s=100" width="100px;" alt="Luan Ramalho"/><br /><sub><b>Luan Ramalho</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=luanbrdev" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gabriel-farache"><img src="https://avatars.githubusercontent.com/u/3036508?v=4?s=100" width="100px;" alt="gabriel-farache"/><br /><sub><b>gabriel-farache</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=gabriel-farache" title="Code">💻</a> <a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=gabriel-farache" title="Tests">⚠️</a></td>
</tr>
</tbody>
</table>

Expand Down
2 changes: 1 addition & 1 deletion client/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<name>Quarkus - Openapi Generator - Deployment</name>

<properties>
<version.org.openapitools>7.0.1</version.org.openapitools>
<version.org.openapitools>7.1.0</version.org.openapitools>
<version.org.slf4j>2.0.9</version.org.slf4j>
<version.com.github.jknack>4.3.1</version.com.github.jknack>
<version.io.swagger.parser>2.1.18</version.io.swagger.parser>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,29 @@ public class CompositeAuthenticationProvider extends AbstractCompositeAuthentica
{#for auth in oauthMethods.orEmpty}
@jakarta.enterprise.context.Dependent
{#if is-resteasy-reactive}
static class OidcClientRequestFilterDelegateImpl{auth_index} extends io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter implements io.quarkiverse.openapi.generator.providers.OAuth2AuthenticationProvider.OidcClientRequestFilterDelegate<org.jboss.resteasy.reactive.client.spi.ResteasyReactiveClientRequestContext> {
{#else}
static class OidcClientRequestFilterDelegateImpl{auth_index} extends io.quarkus.oidc.client.filter.OidcClientRequestFilter implements io.quarkiverse.openapi.generator.providers.OAuth2AuthenticationProvider.OidcClientRequestFilterDelegate<jakarta.ws.rs.client.ClientRequestContext> {
{/if}
static class OidcClientRequestFilterDelegateImpl{auth_index} extends io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter implements io.quarkiverse.openapi.generator.providers.OAuth2AuthenticationProvider.OidcClientRequestFilterDelegate {

private final String clientId = io.quarkiverse.openapi.generator.OpenApiGeneratorConfig.getSanitizedSecuritySchemeName("{auth.name}");

@Override
protected Optional<String> clientId() {
return Optional.of(clientId);
}

@Override
public void filter(jakarta.ws.rs.client.ClientRequestContext requestContext) throws java.io.IOException {
filter((org.jboss.resteasy.reactive.client.spi.ResteasyReactiveClientRequestContext)requestContext);
}
}
{#else}
static class OidcClientRequestFilterDelegateImpl{auth_index} extends io.quarkus.oidc.client.filter.OidcClientRequestFilter implements io.quarkiverse.openapi.generator.providers.OAuth2AuthenticationProvider.OidcClientRequestFilterDelegate {
private final String clientId = io.quarkiverse.openapi.generator.OpenApiGeneratorConfig.getSanitizedSecuritySchemeName("{auth.name}");

@Override
protected Optional<String> clientId() {
return Optional.of(clientId);
}
}
{/if}
{/for}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private void validateConfig() {
}
}

public interface OidcClientRequestFilterDelegate<T extends ClientRequestContext> {
void filter(T requestContext) throws IOException;
public interface OidcClientRequestFilterDelegate {
void filter(ClientRequestContext requestContext) throws IOException;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
*/
public class UrlPatternMatcher {
// Finds parameters in the URL pattern string.
private static final String URL_PARAM_REGEX = "\\{(\\w*?)\\}";
private static final String URL_PARAM_REGEX = "\\{(\\S*?)\\}";

// Replaces parameter names in the URL pattern string to match parameters in URLs.
private static final String URL_PARAM_MATCH_REGEX = "\\([%\\\\w-.\\\\~!\\$&'\\\\(\\\\)\\\\*\\\\+,;=:\\\\[\\\\]@]+?\\)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ private static Stream<Arguments> providePathsThatMatch() {
Arguments.of("/{id}/pets/{id2}", "/1/pets/2?q=1&q2=2"),
Arguments.of("/{id}/{foo}/{id2}", "/1/2/3?q=1&q2=2"),
Arguments.of("/{id}/{foo}/{id2}", "/1/2/3"),
Arguments.of("/v2/pets/{id}", "/v2/pets/1"));
Arguments.of("/v2/pets/{id}", "/v2/pets/1"),
Arguments.of("/pets/{pet-id}/types/{type-id}", "/pets/1/types/2"));
}

}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.version>3.5.0</quarkus.version>
<quarkus.version>3.5.2</quarkus.version>
<apicurio.version>1.1.0.Final</apicurio.version>
<version.com.github.javaparser>3.25.5</version.com.github.javaparser>
<version.org.assertj>3.24.2</version.org.assertj>
Expand Down

0 comments on commit 3513a7d

Please sign in to comment.