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

v3 java package consolidation, folder cleanup, docker image size reduction #189

Merged
merged 43 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f170ddd
Merges core into generator
spacether Jul 19, 2023
d6a6ed6
Refactors codegen module
spacether Jul 19, 2023
6fbbb34
More refactoring
spacether Jul 19, 2023
1b6a8a1
Renames Generator as GeneratorRunner, CodegenConfig renamed to Generator
spacether Jul 20, 2023
e275e92
Removes common subpackage
spacether Jul 20, 2023
ca7ecc0
Reverts validation public changes
spacether Jul 20, 2023
a8c359d
Moves java python client test file
spacether Jul 20, 2023
cad4eff
Moves meta into generators and renames it generatormetadata
spacether Jul 20, 2023
d83d3e5
Removes example module
spacether Jul 20, 2023
d8cb01e
Renames codegenerator to generatorrunner
spacether Jul 20, 2023
9d49bcb
Moves models into generators and renames to openapimodels
spacether Jul 20, 2023
194a79c
Moves ignore int generator, removes unneeded classes for python gener…
spacether Jul 20, 2023
20edc2a
Moves ignore moduel into generatorrunner
spacether Jul 20, 2023
2a74b5f
validation module refactored to move external imports to its root level
spacether Jul 20, 2023
7e9f2dc
Moves java test file
spacether Jul 20, 2023
8930c0a
Removes cli module
spacether Jul 20, 2023
65edc16
Refactors cli into clicommands module
spacether Jul 20, 2023
b7a6ccd
Collapses cli module into remaining module
spacether Jul 20, 2023
7501ba3
Updates dockerfile
spacether Jul 20, 2023
d1f87d4
Removes broken links from pom, removes qos library, increase slf4j ve…
spacether Jul 20, 2023
8f443f0
Removes logToStderr
spacether Jul 20, 2023
ea009fc
Removes unused imports
spacether Jul 20, 2023
2d12692
Fixes arch tests
spacether Jul 21, 2023
41d5b6b
Removes sonatype from pom
spacether Jul 21, 2023
183c2f7
Removes logback xml exclusion
spacether Jul 21, 2023
d2181fa
Fixes groupId and package info
spacether Jul 21, 2023
f4e1033
Fixes mainClass definition
spacether Jul 21, 2023
2874a54
Adds shade plugin, fixes jar running
spacether Jul 21, 2023
c5b3b08
Fixes version info in docker
spacether Jul 21, 2023
6d7c77a
Removes volume
spacether Jul 21, 2023
f14b2b1
Adds multi stage docker image
spacether Jul 21, 2023
c102fbc
Reduces image size further
spacether Jul 21, 2023
ac85e52
Gets checkstyle working
spacether Jul 21, 2023
e738356
Removes scripts modules and website
spacether Jul 21, 2023
588a884
Removes website references
spacether Jul 21, 2023
df641c3
Moves circleci parallel file into .circleci folder
spacether Jul 21, 2023
de13911
turns filtering off, adds pom comment for a versin upgrade
spacether Jul 21, 2023
7287b19
Removes CI folder
spacether Jul 21, 2023
f0a92cf
Changes suffix from project back to cli
spacether Jul 21, 2023
635c5a4
Removes many module and languages references
spacether Jul 21, 2023
cdab882
Ensure up to date run
spacether Jul 21, 2023
19eb293
Turns on filtering for docker verison command
spacether Jul 22, 2023
283ca2d
Actually fixes resource filtering
spacether Jul 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ commands: # a reusable command with parameters
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_parallel.sh
- run: ./.circleci/parallel.sh
# Save dependency cache
- save_cache:
key: source-v2-{{ .Branch }}-{{ .Revision }}
Expand Down Expand Up @@ -126,7 +126,7 @@ commands: # a reusable command with parameters
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_parallel.sh
- run: ./.circleci/parallel.sh
# Teardown
# 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
# Save test results
Expand Down
File renamed without changes.
8 changes: 0 additions & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ docs/ @OpenAPITools/generator-core-team

## Individual interests
.github/**/* @jimschubert
scripts/**/* @jimschubert
website/**/* @jimschubert
bin/ci/**/* @jimschubert

## Build related
Expand All @@ -27,9 +25,3 @@ bin/utils/**/* @OpenAPITools/build
modules/openapi-generator-cli/**/* @jimschubert
modules/openapi-generator-gradle-plugin/**/* @jimschubert
modules/openapi-generator-maven-plugin/**/* @jimschubert

# Martin Delille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapijsonschematools/codegen/languages/CppQtClientCodegen.java @martindelille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapijsonschematools/codegen/languages/CppQtAbstractCodegen.java @martindelille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/resources/cpp-qt-client @martindelille
/Users/martin/dev/clone/openapi-generator/samples/client/petstore/cpp-qt @martindelille
1 change: 0 additions & 1 deletion .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ jobs:
run: |
bash bin/meta-codegen.sh
bash bin/utils/export_docs_generators.sh
bash bin/utils/copy-to-website.sh
bash bin/utils/export_generators_readme.sh
- name: Verify git status
run: |
Expand Down
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ out/
*.gpg
classpath.txt
version.properties
modules/openapi-generator-gradle-plugin/bin/
!modules/openapi-generator-cli/src/main/resources/version.properties
!src/main/resources/version.properties
.project
.classpath
lib/*
Expand Down Expand Up @@ -48,9 +47,8 @@ test-output/
nbactions.xml
test-output/

# website
website/build/
website/package-lock.json
# jgit is making a local file in ? dir, needs a version upgrade
?

# scalatra
samples/server-generator/scalatra/output
Expand Down
98 changes: 0 additions & 98 deletions CI/.drone.yml

This file was deleted.

37 changes: 0 additions & 37 deletions CI/.travis.yml.bash

This file was deleted.

37 changes: 0 additions & 37 deletions CI/.travis.yml.ios

This file was deleted.

29 changes: 0 additions & 29 deletions CI/.travis.yml.jdk6

This file was deleted.

52 changes: 0 additions & 52 deletions CI/deno_install.sh

This file was deleted.

36 changes: 0 additions & 36 deletions CI/settings.xml

This file was deleted.

10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Please file the pull request against the correct branch, e.g. `master` for non-b

### Code generators

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)
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)

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

### Templates

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).
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).

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)

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

### Testing

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)
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)

To test the templates, please perform the following:

- 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)
- 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`.
- 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`.
- 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.
- Finally, git commit the updated samples files: `git commit -a` (`git add -A` if added files with new test cases)
- 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)
- 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)

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