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

Commit 9428d90

Browse files
committed
v3 java package consolidation, folder cleanup, docker image size reduction (#189)
* Merges core into generator * Refactors codegen module * More refactoring * Renames Generator as GeneratorRunner, CodegenConfig renamed to Generator * Removes common subpackage * Reverts validation public changes * Moves java python client test file * Moves meta into generators and renames it generatormetadata * Removes example module * Renames codegenerator to generatorrunner * Moves models into generators and renames to openapimodels * Moves ignore int generator, removes unneeded classes for python generator * Moves ignore moduel into generatorrunner * validation module refactored to move external imports to its root level * Moves java test file * Removes cli module * Refactors cli into clicommands module * Collapses cli module into remaining module * Updates dockerfile * Removes broken links from pom, removes qos library, increase slf4j version * Removes logToStderr * Removes unused imports * Fixes arch tests * Removes sonatype from pom * Removes logback xml exclusion * Fixes groupId and package info * Fixes mainClass definition * Adds shade plugin, fixes jar running * Fixes version info in docker * Removes volume * Adds multi stage docker image * Reduces image size further * Gets checkstyle working * Removes scripts modules and website * Removes website references * Moves circleci parallel file into .circleci folder * turns filtering off, adds pom comment for a versin upgrade * Removes CI folder * Changes suffix from project back to cli * Removes many module and languages references * Ensure up to date run * Turns on filtering for docker verison command * Actually fixes resource filtering
1 parent 78425ba commit 9428d90

File tree

2,046 files changed

+2616
-19021
lines changed

Some content is hidden

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

2,046 files changed

+2616
-19021
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ commands: # a reusable command with parameters
5151
- run:
5252
name: "Setup custom environment variables"
5353
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
54-
- run: ./CI/circle_parallel.sh
54+
- run: ./.circleci/parallel.sh
5555
# Save dependency cache
5656
- save_cache:
5757
key: source-v2-{{ .Branch }}-{{ .Revision }}
@@ -126,7 +126,7 @@ commands: # a reusable command with parameters
126126
- run:
127127
name: "Setup custom environment variables"
128128
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
129-
- run: ./CI/circle_parallel.sh
129+
- run: ./.circleci/parallel.sh
130130
# Teardown
131131
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
132132
# Save test results
File renamed without changes.

.github/CODEOWNERS

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ docs/ @OpenAPITools/generator-core-team
1414

1515
## Individual interests
1616
.github/**/* @jimschubert
17-
scripts/**/* @jimschubert
18-
website/**/* @jimschubert
1917
bin/ci/**/* @jimschubert
2018

2119
## Build related
@@ -27,9 +25,3 @@ bin/utils/**/* @OpenAPITools/build
2725
modules/openapi-generator-cli/**/* @jimschubert
2826
modules/openapi-generator-gradle-plugin/**/* @jimschubert
2927
modules/openapi-generator-maven-plugin/**/* @jimschubert
30-
31-
# Martin Delille
32-
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapijsonschematools/codegen/languages/CppQtClientCodegen.java @martindelille
33-
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapijsonschematools/codegen/languages/CppQtAbstractCodegen.java @martindelille
34-
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/resources/cpp-qt-client @martindelille
35-
/Users/martin/dev/clone/openapi-generator/samples/client/petstore/cpp-qt @martindelille

.github/workflows/openapi-generator.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ jobs:
101101
run: |
102102
bash bin/meta-codegen.sh
103103
bash bin/utils/export_docs_generators.sh
104-
bash bin/utils/copy-to-website.sh
105104
bash bin/utils/export_generators_readme.sh
106105
- name: Verify git status
107106
run: |

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ out/
88
*.gpg
99
classpath.txt
1010
version.properties
11-
modules/openapi-generator-gradle-plugin/bin/
12-
!modules/openapi-generator-cli/src/main/resources/version.properties
11+
!src/main/resources/version.properties
1312
.project
1413
.classpath
1514
lib/*
@@ -48,9 +47,8 @@ test-output/
4847
nbactions.xml
4948
test-output/
5049

51-
# website
52-
website/build/
53-
website/package-lock.json
50+
# jgit is making a local file in ? dir, needs a version upgrade
51+
?
5452

5553
# scalatra
5654
samples/server-generator/scalatra/output

CI/.drone.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

CI/.travis.yml.bash

Lines changed: 0 additions & 37 deletions
This file was deleted.

CI/.travis.yml.ios

Lines changed: 0 additions & 37 deletions
This file was deleted.

CI/.travis.yml.jdk6

Lines changed: 0 additions & 29 deletions
This file was deleted.

CI/deno_install.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

CI/settings.xml

Lines changed: 0 additions & 36 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Please file the pull request against the correct branch, e.g. `master` for non-b
2929

3030
### Code generators
3131

32-
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapijsonschematools/codegen/languages](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/modules/openapi-generator/src/main/java/org/openapijsonschematools/codegen/languages)
32+
All the code generators can be found in [src/main/java/org/openapijsonschematools/codegen/generators](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/src/main/java/org/openapijsonschematools/codegen/generators)
3333

3434
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
3535

3636
### Templates
3737

38-
All the templates ([mustache](https://mustache.github.io/)) can be found in [modules/openapi-generator/src/main/resources](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/modules/openapi-generator/src/main/resources).
38+
All the templates ([mustache](https://mustache.github.io/)) can be found in [src/main/resources](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/src/main/resources).
3939

4040
For a list of variables available in the template, please refer to this [page](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/wiki/Mustache-Template-Variables)
4141

@@ -84,15 +84,15 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master
8484

8585
### Testing
8686

87-
To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapijsonschematools/codegen](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/modules/openapi-generator/src/test/java/org/openapijsonschematools/codegen)
87+
To add test cases (optional) covering the change in the code generator, please refer to [src/test/java/org/openapijsonschematools/codegen](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/src/test/java/org/openapijsonschematools/codegen)
8888

8989
To test the templates, please perform the following:
9090

9191
- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh ./bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
92-
- During development, it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
92+
- During development, it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t src/main/resources/python`.
9393
- Run the tests in the sample folder using maven `mvn integration-test -f /path/to/pom.xml`, e.g. `mvn integration-test -f samples/client/petstore/python/pom.xml`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests). __Please notice:__ you must run a local instance of the Petstore server in order to perform the tests, as running them against petstore.swagger.io is not supported anymore. Please refer to item 3 of [Integration Tests - How to add integration tests for new Petstore samples](https://github.com/OpenAPITools/openapi-generator/wiki/Integration-Tests#how-to-add-integration-tests-for-new-petstore-samples) to learn how to quickly configure and run it.
9494
- Finally, git commit the updated samples files: `git commit -a` (`git add -A` if added files with new test cases)
95-
- For new test cases, please add to the [Fake Petstore spec](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml)
95+
- For new test cases, please add to the [Fake Petstore spec](https://github.com/OpenAPITools/openapi-generator/blob/master/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml)
9696

9797
To start the CI tests, you can:
9898
- Run `mvn verify -Psamples`, assuming you have all the required tools installed to run tests for different languages.

0 commit comments

Comments
 (0)