Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 4822944

Browse files
committed
Updates samples
1 parent d059c56 commit 4822944

File tree

7 files changed

+78
-12
lines changed
  • modules
  • samples/openapi3/client
    • 3_0_3_unit_test/python/.openapi-generator
    • features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator
    • petstore/python/.openapi-generator

7 files changed

+78
-12
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ COPY ./LICENSE ${GEN_DIR}
1111
COPY ./google_checkstyle.xml ${GEN_DIR}
1212

1313
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
14-
COPY ./modules/openapi-json-schema-generator-gradle-plugin ${GEN_DIR}/modules/openapi-json-schema-generator-gradle-plugin
15-
COPY ./modules/openapi-json-schema-generator-maven-plugin ${GEN_DIR}/modules/openapi-json-schema-generator-maven-plugin
1614
COPY ./modules/openapi-json-schema-generator-online ${GEN_DIR}/modules/openapi-json-schema-generator-online
1715
COPY ./modules/openapi-json-schema-generator-cli ${GEN_DIR}/modules/openapi-json-schema-generator-cli
1816
COPY ./modules/openapi-json-schema-generator-core ${GEN_DIR}/modules/openapi-json-schema-generator-core

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Example:
108108

109109
```sh
110110
docker run --rm -v "${PWD}:/local" openapjsonschematools/openapi-json-schema-generator-cli generate \
111-
-i https://raw.githubusercontent.com/openapjsonschematools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml \
111+
-i https://raw.githubusercontent.com/openapi-json-schema-tools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml \
112112
-g python \
113113
-o /local/out/python
114114
```
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.openapitools</groupId>
6+
<artifactId>openapi-json-schema-generator-cli</artifactId>
7+
<version>0.9.9</version>
8+
<licenses>
9+
<license>
10+
<name>Apache License 2.0</name>
11+
<url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
12+
<distribution>repo</distribution>
13+
</license>
14+
</licenses>
15+
<dependencies>
16+
<dependency>
17+
<groupId>org.openapitools</groupId>
18+
<artifactId>openapi-json-schema-generator</artifactId>
19+
<version>0.9.9</version>
20+
<scope>compile</scope>
21+
<exclusions>
22+
<exclusion>
23+
<artifactId>slf4j-simple</artifactId>
24+
<groupId>org.slf4j</groupId>
25+
</exclusion>
26+
</exclusions>
27+
</dependency>
28+
<dependency>
29+
<groupId>io.airlift</groupId>
30+
<artifactId>airline</artifactId>
31+
<version>0.8</version>
32+
<scope>compile</scope>
33+
</dependency>
34+
<dependency>
35+
<groupId>com.googlecode.lambdaj</groupId>
36+
<artifactId>lambdaj</artifactId>
37+
<version>2.3.3</version>
38+
<scope>compile</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>ch.qos.logback</groupId>
42+
<artifactId>logback-classic</artifactId>
43+
<version>1.2.10</version>
44+
<scope>compile</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>org.codehaus.janino</groupId>
48+
<artifactId>janino</artifactId>
49+
<version>3.1.0</version>
50+
<scope>compile</scope>
51+
</dependency>
52+
</dependencies>
53+
<repositories>
54+
<repository>
55+
<snapshots>
56+
<enabled>true</enabled>
57+
</snapshots>
58+
<id>sonatype-snapshots</id>
59+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
60+
</repository>
61+
<repository>
62+
<releases>
63+
<enabled>false</enabled>
64+
</releases>
65+
<snapshots>
66+
<enabled>true</enabled>
67+
</snapshots>
68+
<id>sonatype-nexus-snapshots</id>
69+
<name>Sonatype Nexus Snapshots</name>
70+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
71+
</repository>
72+
</repositories>
73+
</project>

modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,12 +1075,7 @@ private static Schema getSchemaFromContent(Content content) {
10751075
return null;
10761076
}
10771077
Map.Entry<String, MediaType> entry = content.entrySet().iterator().next();
1078-
if (content.size() > 1) {
1079-
// Other content types are currently ignored by codegen. If you see this warning,
1080-
// reorder the OAS spec to put the desired content type first.
1081-
once(LOGGER).warn("Multiple schemas found in the OAS 'content' section, returning only the first one ({})",
1082-
entry.getKey());
1083-
}
1078+
// TODO remove this because content schemas are store elsewhere
10841079
return entry.getValue().getSchema();
10851080
}
10861081

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-SNAPSHOT
1+
0.9.9
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-SNAPSHOT
1+
0.9.9
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-SNAPSHOT
1+
0.9.9

0 commit comments

Comments
 (0)