forked from loafle/openapi-generator-original
Fix Spring CI sample folder (#16005)
* fix spring CI sample folder * fix path * trigger build * test push * add spring jdk17 workflow * trigger build
This commit is contained in:
parent
a2d0b0c5b8
commit
9170306ffa
36
.github/workflows/samples-spring-jdk17.yaml
vendored
Normal file
36
.github/workflows/samples-spring-jdk17.yaml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Samples Java Spring (JDK17)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Java Spring (JDK17)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
sample:
|
||||||
|
# clients
|
||||||
|
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: 17
|
||||||
|
- name: Cache maven dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: maven-repository
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.m2
|
||||||
|
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{ matrix.sample }}
|
||||||
|
run: mvn clean package
|
3
.github/workflows/samples-spring.yaml
vendored
3
.github/workflows/samples-spring.yaml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
- samples/openapi3/client/petstore/spring-stubs-skip-default-interface
|
- samples/openapi3/client/petstore/spring-stubs-skip-default-interface
|
||||||
- samples/openapi3/client/petstore/spring-cloud-async
|
- samples/openapi3/client/petstore/spring-cloud-async
|
||||||
- samples/openapi3/client/petstore/spring-cloud-spring-pageable
|
- samples/openapi3/client/petstore/spring-cloud-spring-pageable
|
||||||
- samples/openapi3/client/petstore/spring-cloud-3-with-optional.yaml
|
- samples/client/petstore/spring-cloud-tags
|
||||||
# servers
|
# servers
|
||||||
- samples/server/petstore/springboot
|
- samples/server/petstore/springboot
|
||||||
- samples/openapi3/server/petstore/springboot
|
- samples/openapi3/server/petstore/springboot
|
||||||
@ -47,7 +47,6 @@ jobs:
|
|||||||
- samples/server/petstore/springboot-spring-pageable-delegatePattern
|
- samples/server/petstore/springboot-spring-pageable-delegatePattern
|
||||||
- samples/server/petstore/springboot-spring-pageable-without-j8
|
- samples/server/petstore/springboot-spring-pageable-without-j8
|
||||||
- samples/server/petstore/springboot-spring-pageable
|
- samples/server/petstore/springboot-spring-pageable
|
||||||
- samples/openapi3/client/petstore/spring-cloud-tags.yaml
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v3
|
||||||
|
@ -93,7 +93,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
|||||||
FrameworkStrategy.NET_6_0,
|
FrameworkStrategy.NET_6_0,
|
||||||
FrameworkStrategy.NET_7_0
|
FrameworkStrategy.NET_7_0
|
||||||
);
|
);
|
||||||
private static FrameworkStrategy latestFramework = frameworkStrategies.get(frameworkStrategies.size() -1);
|
private static FrameworkStrategy latestFramework = frameworkStrategies.get(frameworkStrategies.size() - 1);
|
||||||
protected final Map<String, String> frameworks;
|
protected final Map<String, String> frameworks;
|
||||||
protected String packageGuid = "{" + java.util.UUID.randomUUID().toString().toUpperCase(Locale.ROOT) + "}";
|
protected String packageGuid = "{" + java.util.UUID.randomUUID().toString().toUpperCase(Locale.ROOT) + "}";
|
||||||
protected String clientPackage = "Client";
|
protected String clientPackage = "Client";
|
||||||
@ -1589,7 +1589,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
|||||||
? null
|
? null
|
||||||
: model.discriminator.getPropertyName();
|
: model.discriminator.getPropertyName();
|
||||||
|
|
||||||
for(CodegenProperty oneOfProperty : composedProperties) {
|
for (CodegenProperty oneOfProperty : composedProperties) {
|
||||||
String ref = oneOfProperty.getRef();
|
String ref = oneOfProperty.getRef();
|
||||||
if (ref != null) {
|
if (ref != null) {
|
||||||
for (Map.Entry<String, ModelsMap> composedEntry : objs.entrySet()) {
|
for (Map.Entry<String, ModelsMap> composedEntry : objs.entrySet()) {
|
||||||
|
@ -21,3 +21,4 @@
|
|||||||
#docs/*.md
|
#docs/*.md
|
||||||
# Then explicitly reverse the ignore rule for a single file:
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
#!docs/README.md
|
#!docs/README.md
|
||||||
|
#
|
||||||
|
@ -23,3 +23,4 @@
|
|||||||
#!docs/README.md
|
#!docs/README.md
|
||||||
|
|
||||||
src/test/java/org/openapitools/JacksonTest.java
|
src/test/java/org/openapitools/JacksonTest.java
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user