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

Commit 47860da

Browse files
committed
Samples simplified (#194)
* Renames some folders, removes some test resources * Converts missing v2 specs to v3 specs to fix 2 java tests * Updates readme links * Updates gitignore * Fixes 2 java tests * Fixes more java tests, removes more unused samples * Fixes java test
1 parent b4da997 commit 47860da

File tree

5,006 files changed

+342
-58636
lines changed

Some content is hidden

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

5,006 files changed

+342
-58636
lines changed

.circleci/parallel.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ elif [ "$NODE_INDEX" = "4" ]; then
6767
echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..."
6868

6969
#mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
70-
(cd samples/openapi3/client/petstore/python && make test)
71-
(cd samples/openapi3/client/3_0_3_unit_test/python && make test)
72-
(cd samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python && make test)
73-
(cd samples/openapi3/client/features/security/python && make test)
70+
(cd samples/client/petstore/python && make test)
71+
(cd samples/client/3_0_3_unit_test/python && make test)
72+
(cd samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python && make test)
73+
(cd samples/client/openapi_features/security/python && make test)
7474

7575
else
7676
echo "Running node $NODE_INDEX"

.gitignore

-211
Original file line numberDiff line numberDiff line change
@@ -46,119 +46,9 @@ test-output/
4646
nbactions.xml
4747
test-output/
4848

49-
# scalatra
50-
samples/server-generator/scalatra/output
51-
samples/server-generator/scalatra/target
52-
samples/server-generator/scalatra/output/.history
53-
54-
# nodejs
55-
**/node_modules
56-
samples/server-generator/node/output/node_modules
57-
samples/server/petstore/nodejs/node_modules
58-
samples/server/petstore/nodejs-server/node_modules
59-
60-
# qt cpp
61-
samples/client/build
62-
samples/client/petstore/build
63-
samples/client/petstore/cpp-qt/PetStore/moc_*
64-
samples/client/petstore/cpp-qt/PetStore/*.o
65-
samples/client/petstore/cpp-qt/build-*
66-
samples/client/petstore/cpp-qt/build-*
67-
samples/client/petstore/cpp-qt/PetStore/PetStore
68-
samples/client/petstore/cpp-qt/PetStore/Makefile
69-
samples/client/petstore/cpp-qt/PetStore/PetStore.pro.user
70-
samples/client/petstore/cpp-qt/CMakeLists.txt.user
71-
72-
# cpprestsdk
73-
samples/client/petstore/cpp-restsdk/CMakeCache.txt
74-
samples/client/petstore/cpp-restsdk/CMakeFiles/
75-
samples/client/petstore/cpp-restsdk/Makefile
76-
samples/client/petstore/cpp-restsdk/cmake_install.cmake
77-
7849
#Java/Android
7950
**/.gradle
80-
samples/client/petstore/java/hello.txt
81-
samples/client/petstore/java/okhttp-gson/hello.txt
82-
samples/client/petstore/java/jersey1/hello.txt
83-
samples/client/petstore/java/jersey2-java8/hello.txt
84-
samples/client/petstore/java/jersey2/hello.txt
85-
samples/client/petstore/android/default/hello.txt
86-
samples/client/petstore/android/volley/.gradle/
87-
samples/client/petstore/android/volley/build/
88-
samples/client/petstore/java/jersey2/.gradle/
89-
samples/client/petstore/java/jersey2/build/
90-
samples/client/petstore/java/okhttp-gson/.gradle/
91-
samples/client/petstore/java/okhttp-gson/build/
92-
samples/client/petstore/java/feign/build/
93-
samples/client/petstore/java/feign10x/build/
94-
samples/client/petstore/java/feign/project/
95-
samples/client/petstore/java/feign10x/project/
96-
samples/client/petstore/java/retrofit/build/
97-
samples/client/petstore/java/retrofit2/build/
98-
samples/client/petstore/java/retrofit2/hello.txt
99-
samples/client/petstore/java/retrofit2rx/build/
100-
samples/client/petstore/java/default/build/
101-
samples/client/petstore/scala/build/
102-
samples/client/petstore/java/resttemplate/hello.txt
103-
samples/client/petstore/java/retrofit2/hello.txt
104-
samples/client/petstore/java/feign/hello.txt
105-
samples/client/petstore/java/jersey2-java6/project/
106-
samples/client/petstore/java/jersey2-java8/project/
107-
samples/client/petstore/java/jersey2/project/
108-
109-
# Perl
110-
samples/client/petstore/perl/deep_module_test/
111-
112-
# Objc
113-
samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
114-
samples/client/petstore/objc/default/SwaggerClientTests/Build
115-
samples/client/petstore/objc/default/SwaggerClientTests/Pods
116-
samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcworkspace
117-
samples/client/petstore/objc/default/SwaggerClientTests/Podfile.lock
118-
119-
samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
120-
samples/client/petstore/objc/core-data/SwaggerClientTests/Build
121-
samples/client/petstore/objc/core-data/SwaggerClientTests/Pods
122-
samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcworkspace
123-
samples/client/petstore/objc/core-data/SwaggerClientTests/Podfile.lock
12451

125-
# Swift
126-
samples/client/petstore/swift/**/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
127-
samples/client/petstore/swift/**/SwaggerClientTests/SwaggerClient.xcworkspace/xcuserdata
128-
samples/client/petstore/swift/**/SwaggerClientTests/Pods/
129-
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
130-
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
131-
samples/client/petstore/swift/**/SwaggerClientTests/Podfile.lock
132-
# Swift3
133-
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
134-
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcworkspace/xcuserdata
135-
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/
136-
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
137-
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
138-
samples/client/petstore/swift3/**/SwaggerClientTests/Podfile.lock
139-
140-
# C#
141-
*.csproj.user
142-
samples/client/petstore/csharp/SwaggerClient/IO.Swagger.userprefs
143-
samples/client/petstore/csharp/SwaggerClientTest/obj
144-
samples/client/petstore/csharp/SwaggerClientTest/bin
145-
samples/client/petstore/csharp/SwaggerClientTest/packages
146-
samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/
147-
samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/
148-
samples/client/petstore/csharp/SwaggerClientTest/TestResult.xml
149-
samples/client/petstore/csharp/SwaggerClientTest/nuget.exe
150-
samples/client/petstore/csharp/SwaggerClientTest/testrunner/
151-
samples/client/petstore/csharp/SwaggerClient/.vs
152-
samples/client/petstore/csharp/SwaggerClient/nuget.exe
153-
samples/client/petstore/csharp/SwaggerClient/obj
154-
samples/client/petstore/csharp/SwaggerClient/bin
155-
samples/client/petstore/csharp/SwaggerClient/obj/Debug/
156-
samples/client/petstore/csharp/SwaggerClient/bin/Debug/
157-
samples/client/petstore/csharp/SwaggerClient/packages
158-
samples/client/petstore/csharp/SwaggerClient/TestResult.xml
159-
samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.userprefs
160-
samples/client/petstore/csharp-refactor/OpenAPIClient/TestResult.xml
161-
samples/client/petstore/csharp-refactor/OpenAPIClient/nuget.exe
16252

16353
# Python
16454
*.pyc
@@ -168,104 +58,3 @@ samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt
16858
samples/client/petstore/python/.coverage
16959
samples/client/petstore/python/.projectile
17060
samples/client/petstore/python/.venv/
171-
samples/client/petstore/python-asyncio/.venv/
172-
samples/client/petstore/python-asyncio/.pytest_cache/
173-
samples/client/petstore/python-tornado/.venv/
174-
175-
# PHP
176-
samples/client/petstore/php/OpenAPIClient-php/composer.lock
177-
samples/client/petstore/php-dt/composer.lock
178-
samples/client/petstore/php-dt-modern/composer.lock
179-
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
180-
samples/server/petstore/php-laravel/lib/composer.lock
181-
samples/server/petstore/php-lumen/lib/composer.lock
182-
samples/server/petstore/php-slim4/composer.lock
183-
samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
184-
samples/server/petstore/php-mezzio-ph/composer.lock
185-
samples/server/petstore/php-mezzio-ph-modern/composer.lock
186-
187-
# ts
188-
samples/client/petstore/typescript-angular2/npm/npm-debug.log
189-
samples/client/petstore/typescript-node/npm/npm-debug.log
190-
samples/client/petstore/typescript-angular/tsd-debug.log
191-
samples/client/petstore/typescript-axios/tests/**/dist/
192-
samples/client/petstore/typescript-fetch/tests/**/dist/
193-
194-
# aspnetcore
195-
samples/server/petstore/aspnetcore/.vs/
196-
effective.pom
197-
198-
# kotlin
199-
samples/openapi3/client/petstore/kotlin/build
200-
samples/server/petstore/kotlin-server/ktor/build
201-
samples/server/petstore/kotlin-springboot/build
202-
samples/client/petstore/kotlin*/src/main/kotlin/test/
203-
samples/client/petstore/kotlin*/build/
204-
205-
# haskell
206-
.stack-work
207-
.cabal-sandbox
208-
cabal.project.local
209-
samples/client/petstore/haskell-http-client/docs/haddock-bundle.min.js
210-
samples/client/petstore/haskell-http-client/docs/meta.json
211-
samples/client/petstore/haskell-http-client/docs/quick-jump.css
212-
samples/client/petstore/haskell-http-client/stack.yaml.lock
213-
samples/server/petstore/haskell-servant/stack.yaml.lock
214-
samples/server/petstore/haskell-yesod/stack.yaml.lock
215-
216-
# R
217-
.Rproj.user
218-
samples/client/petstore/R/**/petstore.Rcheck/
219-
samples/client/petstore/R/**/*.tar.gz
220-
samples/client/petstore/R/R.Rproj
221-
samples/client/petstore/R/man/
222-
samples/client/petstore/R-httr2-wrapper/man/
223-
samples/client/petstore/R-httr2/man/
224-
225-
# elixir
226-
samples/client/petstore/elixir/_build/
227-
samples/client/petstore/elixir/deps/
228-
samples/client/petstore/elixir/mix.lock
229-
230-
# groovy
231-
samples/client/petstore/groovy/build
232-
233-
# erlang
234-
samples/client/petstore/erlang-client/_build/
235-
samples/client/petstore/erlang-client/rebar.lock
236-
samples/client/petstore/erlang-proper/_build/
237-
samples/client/petstore/erlang-proper/rebar.lock
238-
samples/server/petstore/erlang-server/_build/
239-
samples/server/petstore/erlang-server/rebar.lock
240-
241-
# Dart
242-
**/dart*/**/.dart_tool
243-
**/dart*/**/.packages
244-
**/dart*/**/pubspec.lock
245-
# Dart dio
246-
**/dart*/**/*.g.dart
247-
248-
# JS
249-
samples/client/petstore/javascript-es6/package-lock.json
250-
samples/client/petstore/javascript-promise-es6/package-lock.json
251-
samples/client/petstore/javascript-apollo/package-lock.json
252-
253-
# elm
254-
samples/client/petstore/elm/index.html
255-
256-
# C
257-
samples/client/petstore/c/build
258-
samples/client/petstore/c/*.so
259-
260-
# Ruby
261-
samples/openapi3/client/petstore/ruby/Gemfile.lock
262-
samples/openapi3/client/petstore/ruby-faraday/Gemfile.lock
263-
264-
# Crystal
265-
samples/client/petstore/crystal/lib
266-
267-
# Go
268-
samples/openapi3/client/petstore/go/privatekey.pem
269-
270-
## OCaml
271-
samples/client/petstore/ocaml/_build/

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ You can join us here: https://discord.gg/mHB8WEQuYQ
2323

2424
## Reasons To Use the Python Generator
2525

26-
- [Autogenerated thorough testing of json schema keyword features in models and endpoints](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/openapi3/client/3_0_3_unit_test/python/test) which come from the [json schema test suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite)
26+
- [Autogenerated thorough testing of json schema keyword features in models and endpoints](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/client/3_0_3_unit_test/python/test) which come from the [json schema test suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite)
2727
- [Tests are passing in CI](https://app.circleci.com/pipelines/github/openapi-json-schema-tools/openapi-json-schema-generator?branch=master)
28-
- [Test endpoints are tagged by the relevant keyword like type/format/allOf 25+ keywords and counting](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags)
28+
- [Test endpoints are tagged by the relevant keyword like type/format/allOf 25+ keywords and counting](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/client/3_0_3_unit_test/python/docs/apis/tags)
2929
- Run time type checking and validation checking when:
3030
- instantiating models
3131
- sending to endpoints
@@ -52,10 +52,10 @@ You can join us here: https://discord.gg/mHB8WEQuYQ
5252

5353
And many more!
5454
- [Docs for the python generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/blob/master/docs/generators/python.md)
55-
- [Openapi json schema v3.0.3 unit test spec](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/blob/master/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml)
56-
- [generated client sample code](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/openapi3/client/3_0_3_unit_test/python)
5755
- [Openapi v3.0.3 general petstore spec, general features](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/blob/master/src/test/resources/3_0/python/petstore_customized.yaml)
58-
- [generated client sample code](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/openapi3/client/petstore/python)
56+
- [generated client sample code](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/client/petstore/python)
57+
- [Openapi json schema v3.0.3 unit test spec](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/blob/master/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml)
58+
- [generated client sample code](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/client/3_0_3_unit_test/python)
5959

6060
### Can I build here?
6161

@@ -223,7 +223,7 @@ java -jar target/openapi-json-schema-generator-cli.jar generate \
223223
-g python \
224224
-t src/main/resources/python \
225225
--additional-properties packageName=petstore_api \
226-
-o samples/openapi3/client/petstore/python
226+
-o samples/client/petstore/python
227227
```
228228

229229
with a number of options. [The python options are documented here.](docs/generators/python.md)

bin/configs/unmaintained/README.md

-8
This file was deleted.

bin/configs/unmaintained/ada.yaml

-7
This file was deleted.

bin/configs/unmaintained/android-httpclient.yaml

-5
This file was deleted.

bin/configs/unmaintained/android-volley.yaml

-7
This file was deleted.

bin/configs/unmaintained/apache2.yaml

-4
This file was deleted.

bin/configs/unmaintained/apex.yaml

-6
This file was deleted.

bin/configs/unmaintained/asciidoc.yaml

-7
This file was deleted.

bin/configs/unmaintained/aspnetcore-2.2.yaml

-7
This file was deleted.

bin/configs/unmaintained/aspnetcore-3.0.yaml

-7
This file was deleted.

bin/configs/unmaintained/aspnetcore-3.1.yaml

-9
This file was deleted.

bin/configs/unmaintained/aspnetcore-5.0.yaml

-7
This file was deleted.

bin/configs/unmaintained/aspnetcore-6.0-pocoModels.yaml

-9
This file was deleted.

bin/configs/unmaintained/aspnetcore-6.0-project4Models.yaml

-9
This file was deleted.

bin/configs/unmaintained/aspnetcore-6.0.yaml

-8
This file was deleted.

bin/configs/unmaintained/avro-schema.yaml

-4
This file was deleted.

0 commit comments

Comments
 (0)