-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from OpenAPITools/master
merge latest openapi
- Loading branch information
Showing
2,152 changed files
with
66,844 additions
and
9,895 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
# Copyright 2019 the Deno authors. All rights reserved. MIT license. | ||
# TODO(everyone): Keep this script simple and easily auditable. | ||
|
||
set -e | ||
|
||
if ! command -v unzip >/dev/null; then | ||
echo "Error: unzip is required to install Deno (see: https://github.com/denoland/deno_install#unzip-is-required)." 1>&2 | ||
exit 1 | ||
fi | ||
|
||
if [ "$OS" = "Windows_NT" ]; then | ||
target="x86_64-pc-windows-msvc" | ||
else | ||
case $(uname -s) in | ||
Darwin) target="x86_64-apple-darwin" ;; | ||
*) target="x86_64-unknown-linux-gnu" ;; | ||
esac | ||
fi | ||
|
||
if [ $# -eq 0 ]; then | ||
deno_uri="https://github.com/denoland/deno/releases/latest/download/deno-${target}.zip" | ||
else | ||
deno_uri="https://github.com/denoland/deno/releases/download/${1}/deno-${target}.zip" | ||
fi | ||
|
||
deno_install="${DENO_INSTALL:-$HOME/.deno}" | ||
bin_dir="$deno_install/bin" | ||
exe="$bin_dir/deno" | ||
|
||
if [ ! -d "$bin_dir" ]; then | ||
mkdir -p "$bin_dir" | ||
fi | ||
|
||
curl --fail --location --progress-bar --output "$exe.zip" "$deno_uri" | ||
unzip -d "$bin_dir" -o "$exe.zip" | ||
chmod +x "$exe" | ||
rm "$exe.zip" | ||
|
||
echo "Deno was installed successfully to $exe" | ||
if command -v deno >/dev/null; then | ||
echo "Run 'deno --help' to get started" | ||
else | ||
case $SHELL in | ||
/bin/zsh) shell_profile=".zshrc" ;; | ||
*) shell_profile=".bash_profile" ;; | ||
esac | ||
echo "Manually add the directory to your \$HOME/$shell_profile (or similar)" | ||
echo " export DENO_INSTALL=\"$deno_install\"" | ||
echo " export PATH=\"\$DENO_INSTALL/bin:\$PATH\"" | ||
echo "Run '$exe --help' to get started" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
generatorName: dart-dio | ||
outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/dart-dio | ||
additionalProperties: | ||
hideGenerationTimestamp: "true" |
2 changes: 1 addition & 1 deletion
2
bin/configs/dart-dio.yaml → ...gs/dart-dio-petstore-client-lib-oas2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
generatorName: dart-dio | ||
outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/dart-dio | ||
additionalProperties: | ||
hideGenerationTimestamp: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
generatorName: dart | ||
outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib_fake | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/dart2 | ||
additionalProperties: | ||
hideGenerationTimestamp: "true" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
generatorName: dart | ||
outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/dart2 | ||
additionalProperties: | ||
hideGenerationTimestamp: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
generatorName: java | ||
outputDir: samples/client/petstore/java/okhttp-gson-dynamicOperations | ||
library: okhttp-gson | ||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/Java | ||
additionalProperties: | ||
artifactId: petstore-okhttp-gson-dynamicoperations | ||
hideGenerationTimestamp: "true" | ||
dynamicOperations: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env ruby | ||
# ruby script to detect changes in test-related files | ||
require 'yaml' | ||
require 'digest' | ||
|
||
hash = Digest::SHA256.hexdigest("xyz") | ||
|
||
filename= ARGV[0] | ||
|
||
if !filename | ||
puts "Usage: #{$0} filename" | ||
exit 1 | ||
end | ||
|
||
if !File.file? filename | ||
warn "Error. #{filename} doesn't exist." | ||
exit 1 | ||
end | ||
|
||
mismatch = 0 | ||
count = 0 | ||
|
||
test_files = YAML.load_file(filename) | ||
test_files.each do |test_file| | ||
count = count + 1 | ||
# file still exists? | ||
if !File.file? test_file['filename'] | ||
warn "Error. Provided test file `#{test_file['filename']}` doesn't exist." | ||
mismatch = mismatch + 1 | ||
end | ||
|
||
# check sha256 hash | ||
sha256 = Digest::SHA256.hexdigest(File.read(test_file['filename'])) | ||
if test_file['sha256'] != sha256 | ||
warn "Looks like #{test_file['filename']} has been modified as its SHA256 `#{sha256}` is not the same as the one in the record: #{test_file['sha256']}" | ||
mismatch = mismatch + 1 | ||
else | ||
# no change to the test file | ||
end | ||
end | ||
|
||
if mismatch > 0 | ||
warn "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
warn "There are #{mismatch} mismatch. Please review the test files to ensure it has not been deleted/regenerated." | ||
warn "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
exit 1 | ||
else | ||
puts "OK. All matched!" | ||
end | ||
|
||
if count == 0 | ||
warn "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
warn "Looks like the test file list in #{filename} is empty! Please check!" | ||
warn "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
exit 1 | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
# csharp-netcore test files and image for upload | ||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs" | ||
sha256: b74ef9eefa4b41fd3233e083fe2355babf25a77f9073d28e1aa81ae2e0a5f1d0 | ||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png" | ||
sha256: 0a67c32728197e942b13bdda064b73793f12f5c795f1e5cf35a3adf69c973230 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.