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

Commit bb2e22f

Browse files
committed
v2 replace openapi generator with openapi json schema generator (#113)
* Replaces references with new project location * Samples regenerated * FIxes python tests
1 parent 2bac472 commit bb2e22f

1,873 files changed

Lines changed: 2829 additions & 2850 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/openapi-json-schema-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/**
3131
* User: lanwen Date: 24.03.15 Time: 17:56
3232
* <p>
33-
* Command line interface for OpenAPI Generator use `openapi-generator-cli.jar help` for more info
33+
* Command line interface for OpenAPI JSON Schema Generator use `openapi-generator-cli.jar help` for more info
3434
*/
3535
public class OpenAPIGenerator {
3636

@@ -41,7 +41,7 @@ public static void main(String[] args) {
4141
.withDescription(
4242
String.format(
4343
Locale.ROOT,
44-
"OpenAPI Generator CLI %s (%s).",
44+
"OpenAPI JSON Schema Generator CLI %s (%s).",
4545
buildInfo.getVersion(),
4646
buildInfo.getSha()))
4747
.withDefaultCommand(HelpCommand.class)

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@
1919

2020
import org.openapitools.codegen.utils.ModelUtils;
2121

22-
import java.util.HashMap;
23-
import java.util.HashSet;
24-
import java.util.LinkedHashMap;
2522
import java.util.Map;
2623
import java.util.Objects;
27-
import java.util.Set;
2824

2925
/**
3026
* Describes a single operation parameter in the OAS specification.

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
/*
2-
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
3-
* Copyright 2018 SmartBear Software
4-
*
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
*
9-
* https://www.apache.org/licenses/LICENSE-2.0
10-
*
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
16-
*/
17-
181
package org.openapitools.codegen;
192

203
import java.util.HashMap;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,9 @@ public void setOpenAPI(OpenAPI openAPI) {
640640
@SuppressWarnings("static-method")
641641
public void postProcess() {
642642
System.out.println("################################################################################");
643-
System.out.println("# Thanks for using OpenAPI Generator. #");
643+
System.out.println("# Thanks for using OpenAPI JSON Schema Generator. #");
644644
System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #");
645-
System.out.println("# https://opencollective.com/openapi_generator/donate #");
645+
System.out.println("# https://github.com/sponsors/spacether #");
646646
System.out.println("################################################################################");
647647
}
648648

@@ -1387,7 +1387,7 @@ public DefaultCodegen() {
13871387
generatorMetadata = GeneratorMetadata.newBuilder()
13881388
.stability(Stability.STABLE)
13891389
.featureSet(DefaultFeatureSet)
1390-
.generationMessage(String.format(Locale.ROOT, "OpenAPI Generator: %s (%s)", getName(), codegenType.toValue()))
1390+
.generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", getName(), codegenType.toValue()))
13911391
.build();
13921392

13931393
defaultIncludes = new HashSet<>(

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public TemplateProcessor getTemplateProcessor() {
169169

170170
/**
171171
* Programmatically disable the output of .openapi-generator/VERSION, .openapi-generator-ignore,
172-
* or other metadata files used by OpenAPI Generator.
172+
* or other metadata files used by OpenAPI JSON Schema Generator.
173173
*
174174
* @param generateMetadata true: enable outputs, false: disable outputs
175175
*/
@@ -307,9 +307,9 @@ private void configureOpenAPIInfo() {
307307
if (StringUtils.isEmpty(info.getDescription())) {
308308
// set a default description if none if provided
309309
config.additionalProperties().put("appDescription",
310-
"No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)");
310+
"No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator)");
311311
config.additionalProperties().put("appDescriptionWithNewLines", config.additionalProperties().get("appDescription"));
312-
config.additionalProperties().put("unescapedAppDescription", "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)");
312+
config.additionalProperties().put("unescapedAppDescription", "No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator)");
313313
} else {
314314
config.additionalProperties().put("appDescription", config.escapeText(info.getDescription()));
315315
config.additionalProperties().put("appDescriptionWithNewLines", config.escapeTextWhileAllowingNewLines(info.getDescription()));

modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,9 @@ private static boolean isMultipartType(List<Map<String, String>> consumes) {
887887
@Override
888888
public void postProcess() {
889889
System.out.println("################################################################################");
890-
System.out.println("# Thanks for using OpenAPI Generator. #");
890+
System.out.println("# Thanks for using OpenAPI JSON Schema Generator. #");
891891
System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #");
892-
System.out.println("# https://opencollective.com/openapi_generator/donate #");
892+
System.out.println("# https://github.com/sponsors/spacether #");
893893
System.out.println("# #");
894894
System.out.println("# This generator's contributed by Jim Schubert (https://github.com/jimschubert)#");
895895
System.out.println("# Please support his work directly via https://patreon.com/jimschubert \uD83D\uDE4F #");

modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,9 +2152,9 @@ public String toRefClass(String ref, String sourceJsonPath, String expectedCompo
21522152
@Override
21532153
public void postProcess() {
21542154
System.out.println("################################################################################");
2155-
System.out.println("# Thanks for using OpenAPI Generator. #");
2155+
System.out.println("# Thanks for using OpenAPI JSON Schema Generator. #");
21562156
System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #");
2157-
System.out.println("# https://opencollective.com/openapi_generator/donate #");
2157+
System.out.println("# https://github.com/sponsors/spacether #");
21582158
System.out.println("# #");
21592159
System.out.println("# This generator was written by Justin Black (https://github.com/spacether) #");
21602160
System.out.println("# Please support his work directly via https://github.com/sponsors/spacether \uD83D\uDE4F#");

modules/openapi-json-schema-generator/src/main/resources/python/README_onlypackage.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{{appDescription}}}
44
{{/if}}
55

6-
The `{{packageName}}` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
6+
The `{{packageName}}` package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project:
77

88
- API version: {{appVersion}}
99
- Package version: {{packageVersion}}

modules/openapi-json-schema-generator/src/main/resources/python/__init__test_paths.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from urllib3._collections import HTTPHeaderDict
77

88
class ApiTestMixin:
99
json_content_type = 'application/json'
10-
user_agent = 'OpenAPI-Generator/1.0.0/python'
10+
user_agent = 'OpenAPI-JSON-Schema-Generator/1.0.0/python'
1111

1212
@classmethod
1313
def assert_pool_manager_request_called_with(

modules/openapi-json-schema-generator/src/main/resources/python/api.handlebars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class {{classname}}(
1515
{{operationIdCamelCase}},
1616
{{/each}}
1717
):
18-
"""NOTE: This class is auto generated by OpenAPI Generator
19-
Ref: https://openapi-generator.tech
18+
"""NOTE: This class is auto generated by OpenAPI JSON Schema Generator
19+
Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator
2020

2121
Do not edit the class manually.
2222
"""

0 commit comments

Comments
 (0)