-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compile error in client properties configuration #18232
Merged
wing328
merged 6 commits into
OpenAPITools:master
from
MelleD:18231_Compile-error-in-ClientPropertiesConfiguration
Mar 26, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
49ffb73
Fix config
MelleD 5c3f07d
Merge branch 'master' into 18231_Compile-error-in-ClientPropertiesCon…
MelleD ffedfb1
Add tests
MelleD cf0d86e
Remove unused import
MelleD 9ace7c0
Sort imports
MelleD d6fcc31
Add new workflow
MelleD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
generatorName: spring | ||
outputDir: samples/client/petstore/spring-cloud-auth | ||
library: spring-cloud | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-auth.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring | ||
additionalProperties: | ||
documentationProvider: none | ||
artifactId: petstore-spring-cloud-auth | ||
hideGenerationTimestamp: "true" |
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
29 changes: 0 additions & 29 deletions
29
modules/openapi-generator/src/test/resources/3_0/issue_18090.yaml
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
modules/openapi-generator/src/test/resources/3_0/spring/petstore-auth.yaml
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,37 @@ | ||
openapi: "3.0.3" | ||
info: | ||
description: 'This spec is mainly for testing Petstore server and contains fake | ||
endpoints, models. Please do not use this for any other purpose. Special | ||
characters: " \' | ||
version: 1.0.0 | ||
title: OpenAPI Petstore Auth | ||
license: | ||
name: Apache-2.0 | ||
url: https://www.apache.org/licenses/LICENSE-2.0.html | ||
|
||
security: | ||
- OAuth2: [openid, profile, aud] | ||
|
||
paths: | ||
/some/endpoint: | ||
get: | ||
responses: | ||
"200": | ||
description: OK | ||
|
||
components: | ||
securitySchemes: | ||
OAuth2: | ||
type: oauth2 | ||
x-tokenName: id_token | ||
flows: | ||
authorizationCode: | ||
authorizationUrl: "${authorizationUrl}" | ||
tokenUrl: "${tokenUrl}" | ||
scopes: | ||
openid: Access OpenId Connect info | ||
profile: Profile info | ||
aud: Audience info | ||
clientCredentials: | ||
tokenUrl: '/openid-connect/token' | ||
scopes: { } |
23 changes: 23 additions & 0 deletions
23
samples/client/petstore/spring-cloud-auth/.openapi-generator-ignore
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,23 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
7 changes: 7 additions & 0 deletions
7
samples/client/petstore/spring-cloud-auth/.openapi-generator/FILES
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,7 @@ | ||
README.md | ||
pom.xml | ||
src/main/java/org/openapitools/api/SomeApi.java | ||
src/main/java/org/openapitools/api/SomeApiClient.java | ||
src/main/java/org/openapitools/configuration/ApiKeyRequestInterceptor.java | ||
src/main/java/org/openapitools/configuration/ClientConfiguration.java | ||
src/main/java/org/openapitools/configuration/ClientPropertiesConfiguration.java |
1 change: 1 addition & 0 deletions
1
samples/client/petstore/spring-cloud-auth/.openapi-generator/VERSION
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 @@ | ||
7.5.0-SNAPSHOT |
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,53 @@ | ||
# petstore-spring-cloud-auth | ||
|
||
## Requirements | ||
|
||
Building the API client library requires [Maven](https://maven.apache.org/) to be installed. | ||
|
||
## Installation | ||
|
||
To install the API client library to your local Maven repository, simply execute: | ||
|
||
```shell | ||
mvn install | ||
``` | ||
|
||
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: | ||
|
||
```shell | ||
mvn deploy | ||
``` | ||
|
||
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. | ||
|
||
### Maven users | ||
|
||
Add this dependency to your project's POM: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>org.openapitools</groupId> | ||
<artifactId>petstore-spring-cloud-auth</artifactId> | ||
<version>1.0.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
``` | ||
|
||
### Gradle users | ||
|
||
Add this dependency to your project's build file: | ||
|
||
```groovy | ||
compile "org.openapitools:petstore-spring-cloud-auth:1.0.0" | ||
``` | ||
|
||
### Others | ||
|
||
At first generate the JAR by executing: | ||
|
||
mvn package | ||
|
||
Then manually install the following JARs: | ||
|
||
* target/petstore-spring-cloud-auth-1.0.0.jar | ||
* target/lib/*.jar |
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,75 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.openapitools</groupId> | ||
<artifactId>petstore-spring-cloud-auth</artifactId> | ||
<packaging>jar</packaging> | ||
<name>petstore-spring-cloud-auth</name> | ||
<version>1.0.0</version> | ||
<properties> | ||
<java.version>1.8</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>2.7.15</version> | ||
<relativePath/> <!-- lookup parent from repository --> | ||
</parent> | ||
<build> | ||
<sourceDirectory>src/main/java</sourceDirectory> | ||
</build> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-starter-parent</artifactId> | ||
<version>2021.0.5</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<!-- @Nullable annotation --> | ||
<dependency> | ||
<groupId>com.google.code.findbugs</groupId> | ||
<artifactId>jsr305</artifactId> | ||
<version>3.0.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-starter-openfeign</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-oauth2-client</artifactId> | ||
<version>5.7.8</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jsr310</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openapitools</groupId> | ||
<artifactId>jackson-databind-nullable</artifactId> | ||
<version>0.2.6</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-validation</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.data</groupId> | ||
<artifactId>spring-data-commons</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add the new folder to thew spring workflow in .github/workflows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done