Skip to content

Commit e748940

Browse files
authored
Merge branch 'main' into mock-module
2 parents 62cf54e + 1230fb8 commit e748940

File tree

25 files changed

+769
-17
lines changed

25 files changed

+769
-17
lines changed

.all-contributorsrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,24 @@
369369
"contributions": [
370370
"code"
371371
]
372+
},
373+
{
374+
"login": "rednalyn",
375+
"name": "rednalyn",
376+
"avatar_url": "https://avatars.githubusercontent.com/u/31593992?v=4",
377+
"profile": "https://github.com/rednalyn",
378+
"contributions": [
379+
"doc"
380+
]
381+
},
382+
{
383+
"login": "marko-bekhta",
384+
"name": "Marko Bekhta",
385+
"avatar_url": "https://avatars.githubusercontent.com/u/4004823?v=4",
386+
"profile": "https://github.com/marko-bekhta",
387+
"contributions": [
388+
"code"
389+
]
372390
}
373391
],
374392
"contributorsPerLine": 7,

.github/project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
release:
2-
current-version: 2.5.0
2+
current-version: 2.6.0
33
next-version: 3.0.0-SNAPSHOT

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- "main"
7+
- "main-lts"
78
paths-ignore:
89
- '.gitignore'
910
- 'CODEOWNERS'
@@ -27,7 +28,10 @@ jobs:
2728
runs-on: ${{ matrix.os }}
2829
strategy:
2930
matrix:
30-
os: [ubuntu-latest, windows-latest]
31+
os: [
32+
ubuntu-latest,
33+
# windows-latest - Disabled due to https://github.com/quarkiverse/quarkus-openapi-generator/pull/836#issuecomment-2457329495
34+
]
3135
java: [
3236
{ 'version': '17' },
3337
{ 'version': '21' }
@@ -53,7 +57,10 @@ jobs:
5357
runs-on: ${{ matrix.os }}
5458
strategy:
5559
matrix:
56-
os: [ubuntu-latest, windows-latest]
60+
os: [
61+
ubuntu-latest,
62+
# windows-latest - Disabled due to https://github.com/quarkiverse/quarkus-openapi-generator/pull/836#issuecomment-2457329495
63+
]
5764
java: [
5865
{ 'version': '17' },
5966
{ 'version': '21' }

.github/workflows/build_website.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- "main"
7+
- "main-lts"
78
paths-ignore:
89
- '.gitignore'
910
- 'CODEOWNERS'

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [ "main", "main-lts" ]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: [ "main", "main-lts" ]
88
schedule:
99
- cron: "2 0 * * 6"
1010

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
2+
<div align="center">
3+
4+
<img src="https://github.com/quarkiverse/.github/blob/main/assets/images/quarkus.svg" width="67" height="70" ><img src="https://github.com/quarkiverse/.github/blob/main/assets/images/plus-sign.svg" height="70" ><img src="https://github.com/quarkiverse/quarkus-openapi-generator/blob/main/docs/modules/ROOT/assets/images/openapi.svg" height="70" >
5+
16
# Quarkus - OpenAPI Generator
7+
</div>
8+
<br>
29

310
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4-
[![All Contributors](https://img.shields.io/badge/all_contributors-39-orange.svg?style=flat-square)](#contributors-)
11+
[![All Contributors](https://img.shields.io/badge/all_contributors-41-orange.svg?style=flat-square)](#contributors-)
512
<!-- ALL-CONTRIBUTORS-BADGE:END -->
613
[![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)
714
[![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)
@@ -89,6 +96,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
8996
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gmalheiro"><img src="https://avatars.githubusercontent.com/u/92603922?v=4?s=100" width="100px;" alt="Gabriel Malheiro"/><br /><sub><b>Gabriel Malheiro</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=gmalheiro" title="Documentation">📖</a></td>
9097
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kfebert"><img src="https://avatars.githubusercontent.com/u/848796?v=4?s=100" width="100px;" alt="Karl Ferdinand Ebert"/><br /><sub><b>Karl Ferdinand Ebert</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=kfebert" title="Code">💻</a> <a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=kfebert" title="Documentation">📖</a></td>
9198
<td align="center" valign="top" width="14.28%"><a href="https://github.com/michalkolenda"><img src="https://avatars.githubusercontent.com/u/29705783?v=4?s=100" width="100px;" alt="Michał Kolenda"/><br /><sub><b>Michał Kolenda</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=michalkolenda" title="Code">💻</a></td>
99+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rednalyn"><img src="https://avatars.githubusercontent.com/u/31593992?v=4?s=100" width="100px;" alt="rednalyn"/><br /><sub><b>rednalyn</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=rednalyn" title="Documentation">📖</a></td>
100+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marko-bekhta"><img src="https://avatars.githubusercontent.com/u/4004823?v=4?s=100" width="100px;" alt="Marko Bekhta"/><br /><sub><b>Marko Bekhta</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-openapi-generator/commits?author=marko-bekhta" title="Code">💻</a></td>
92101
</tr>
93102
</tbody>
94103
</table>

client/deployment/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<version.org.openapitools>7.8.0</version.org.openapitools>
1515
<version.org.slf4j>2.0.16</version.org.slf4j>
1616
<version.com.github.jknack>4.3.1</version.com.github.jknack>
17+
<version.io.swagger.parser>2.1.24</version.io.swagger.parser>
1718
</properties>
1819

1920
<dependencies>

client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/GeneratorProcessor.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.quarkiverse.openapi.generator.deployment;
22

3+
import static io.quarkus.bootstrap.classloading.QuarkusClassLoader.isClassPresentAtRuntime;
4+
35
import java.util.Collection;
46
import java.util.List;
57
import java.util.Map;
@@ -48,9 +50,10 @@ public class GeneratorProcessor {
4850
private static final DotName BASIC_AUTHENTICATION_MARKER = DotName.createSimple(BasicAuthenticationMarker.class);
4951
private static final DotName BEARER_AUTHENTICATION_MARKER = DotName.createSimple(BearerAuthenticationMarker.class);
5052
private static final DotName API_KEY_AUTHENTICATION_MARKER = DotName.createSimple(ApiKeyAuthenticationMarker.class);
51-
5253
private static final DotName OPERATION_MARKER = DotName.createSimple(OperationMarker.class);
5354

55+
private static final String ABSTRACT_TOKEN_PRODUCER = "io.quarkus.oidc.client.runtime.AbstractTokensProducer";
56+
5457
@BuildStep
5558
FeatureBuildItem feature() {
5659
return new FeatureBuildItem(FEATURE);
@@ -61,6 +64,10 @@ void additionalBean(
6164
Capabilities capabilities,
6265
BuildProducer<AdditionalBeanBuildItem> producer) {
6366

67+
if (!isClassPresentAtRuntime(ABSTRACT_TOKEN_PRODUCER)) {
68+
return;
69+
}
70+
6471
if (capabilities.isPresent(Capability.REST_CLIENT_REACTIVE)) {
6572
producer.produce(
6673
AdditionalBeanBuildItem.builder().addBeanClass(ReactiveOidcClientRequestFilterDelegate.class)
@@ -103,10 +110,15 @@ void produceCompositeProviders(AuthenticationRecorder recorder,
103110

104111
@BuildStep
105112
@Record(ExecutionTime.STATIC_INIT)
106-
void produceOauthAuthentication(CombinedIndexBuildItem beanArchiveBuildItem,
113+
void produceOauthAuthentication(
114+
CombinedIndexBuildItem beanArchiveBuildItem,
107115
BuildProducer<AuthProviderBuildItem> authenticationProviders,
108116
BuildProducer<SyntheticBeanBuildItem> beanProducer,
109117
AuthenticationRecorder recorder) {
118+
119+
if (!isClassPresentAtRuntime(ABSTRACT_TOKEN_PRODUCER)) {
120+
return;
121+
}
110122
Collection<AnnotationInstance> authenticationMarkers = beanArchiveBuildItem.getIndex()
111123
.getAnnotationsWithRepeatable(OAUTH_AUTHENTICATION_MARKER, beanArchiveBuildItem.getIndex());
112124

client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/codegen/OpenApiConfigValidator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import java.util.Set;
88
import java.util.regex.Matcher;
99
import java.util.regex.Pattern;
10-
import java.util.stream.Collectors;
1110

1211
import org.slf4j.Logger;
1312
import org.slf4j.LoggerFactory;
@@ -29,7 +28,7 @@ public static void validateInputConfiguration(List<String> configNames) throws C
2928
.filter(pn -> pn.startsWith("quarkus.openapi-generator.codegen"))
3029
.map(CONFIG_PATTERN::matcher)
3130
.filter(Matcher::find)
32-
.collect(Collectors.toList());
31+
.toList();
3332

3433
if (!userOpenApiConfigurations.isEmpty()) {
3534
Set<String> unsupportedConfigNames = new HashSet<>();

client/deployment/src/main/resources/templates/libraries/microprofile/auth/compositeAuthenticationProvider.qute

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ package {apiPackage}.auth;
2222
public class CompositeAuthenticationProvider implements jakarta.ws.rs.client.ClientRequestFilter {
2323

2424
@jakarta.inject.Inject
25-
@io.quarkiverse.openapi.generator.OpenApiSpec(openApiSpecId="{configKey}")
25+
@io.quarkiverse.openapi.generator.OpenApiSpec(openApiSpecId="{quarkus-generator.openApiSpecId}")
2626
io.quarkiverse.openapi.generator.providers.CompositeAuthenticationProvider compositeProvider;
2727

2828
@java.lang.Override

0 commit comments

Comments
 (0)