forked from loafle/openapi-generator-original
Migrate schema samples to use OAS3 samples instead (#6294)
* migrate mysql samples to oas 3.0 * update apache2 to use oas3 spec * migrate graphql samples to use oas3 spec * move avro script under bin * update protobuf samples to use openapi3 spec * add new files
This commit is contained in:
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -g apache2 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/config/petstore/apache2 $@"
|
||||
ags="generate -g apache2 -t modules/openapi-generator/src/main/resources/apache2/ -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o samples/config/petstore/apache2 $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
32
bin/avro-petstore.sh
Executable file
32
bin/avro-petstore.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/avro-schema -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g avro-schema -o samples/openapi3/schema/petstore/avro-schema $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/graphql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema --additional-properties packageName=petstore $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/graphql-schema -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema --additional-properties packageName=petstore $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/mysql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples/schema/petstore/mysql $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/mysql-schema -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples/schema/petstore/mysql $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/protobuf-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g protobuf-schema -o samples/config/petstore/protobuf-schema --additional-properties packageName=petstore $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/protobuf-schema -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g protobuf-schema -o samples/config/petstore/protobuf-schema --additional-properties packageName=petstore $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g apache2 -o samples\config\petstore\apache2\
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\apache2\ -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g apache2 -o samples\config\petstore\apache2\
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\graphql-schema -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g graphql-schema -o samples\config\petstore\graphql-schema
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\graphql-schema -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g graphql-schema -o samples\config\petstore\graphql-schema
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples\schema\petstore\mysql
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples\schema\petstore\mysql
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.2.3-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -1,4 +1,4 @@
|
||||
<Location "/v2/pet">
|
||||
<Location "/v2/pet/pet/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -16,7 +16,7 @@
|
||||
Require group read:pets
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/pet/*">
|
||||
<Location "/v2/pet/{petId}/pet/*/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -34,7 +34,7 @@
|
||||
Require group read:pets
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/pet/findByStatus">
|
||||
<Location "/v2/pet/findByStatus/pet/findByStatus/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -44,11 +44,10 @@
|
||||
Require valid-user
|
||||
</LimitExcept>
|
||||
<Limit GET>
|
||||
Require group write:pets
|
||||
Require group read:pets
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/pet/findByTags">
|
||||
<Location "/v2/pet/findByTags/pet/findByTags/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -58,11 +57,10 @@
|
||||
Require valid-user
|
||||
</LimitExcept>
|
||||
<Limit GET>
|
||||
Require group write:pets
|
||||
Require group read:pets
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/pet/*/uploadImage">
|
||||
<Location "/v2/pet/{petId}/uploadImage/pet/*/uploadImage/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Location "/v2/store/order/*">
|
||||
<Location "/v2/store/order/{orderId}/store/order/*/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -14,7 +14,7 @@
|
||||
Require valid-user
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/store/inventory">
|
||||
<Location "/v2/store/inventory/store/inventory/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -24,7 +24,7 @@
|
||||
Require valid-user
|
||||
</LimitExcept>
|
||||
</Location>
|
||||
<Location "/v2/store/order">
|
||||
<Location "/v2/store/order/store/order/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Location "/v2/user">
|
||||
<Location "/v2/user/user/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -7,11 +7,8 @@
|
||||
<LimitExcept GET POST PUT DELETE>
|
||||
Require valid-user
|
||||
</LimitExcept>
|
||||
<Limit POST>
|
||||
Require valid-user
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/user/createWithArray">
|
||||
<Location "/v2/user/createWithArray/user/createWithArray/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -20,11 +17,8 @@
|
||||
<LimitExcept GET POST PUT DELETE>
|
||||
Require valid-user
|
||||
</LimitExcept>
|
||||
<Limit POST>
|
||||
Require valid-user
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/user/createWithList">
|
||||
<Location "/v2/user/createWithList/user/createWithList/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -33,30 +27,8 @@
|
||||
<LimitExcept GET POST PUT DELETE>
|
||||
Require valid-user
|
||||
</LimitExcept>
|
||||
<Limit POST>
|
||||
Require valid-user
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/user/*">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
AuthType basic
|
||||
AuthName "api"
|
||||
<LimitExcept GET POST PUT DELETE>
|
||||
Require valid-user
|
||||
</LimitExcept>
|
||||
<Limit DELETE>
|
||||
Require valid-user
|
||||
</Limit>
|
||||
<Limit GET>
|
||||
Require valid-user
|
||||
</Limit>
|
||||
<Limit PUT>
|
||||
Require valid-user
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/user/login">
|
||||
<Location "/v2/user/{username}/user/*/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -69,7 +41,7 @@
|
||||
Require valid-user
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/user/logout">
|
||||
<Location "/v2/user/login/user/login/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
@@ -82,3 +54,13 @@
|
||||
Require valid-user
|
||||
</Limit>
|
||||
</Location>
|
||||
<Location "/v2/user/logout/user/logout/">
|
||||
AuthBasicProvider file
|
||||
AuthUserFile "/var/www/html/htpwd"
|
||||
AuthGroupFile "/var/www/html/groups"
|
||||
AuthType basic
|
||||
AuthName "api"
|
||||
<LimitExcept GET POST PUT DELETE>
|
||||
Require valid-user
|
||||
</LimitExcept>
|
||||
</Location>
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.0.0-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
type mutation {
|
||||
# Add a new pet to the store
|
||||
# @param Pet body Pet object that needs to be added to the store
|
||||
# @return [null]
|
||||
AddPet(body: Pet): null
|
||||
# @param Pet pet Pet object that needs to be added to the store
|
||||
# @return [Pet]
|
||||
AddPet(pet: Pet): Pet
|
||||
|
||||
# Deletes a pet
|
||||
# @param Int! petId Pet id to delete
|
||||
@@ -21,9 +21,9 @@ type mutation {
|
||||
DeletePet(petId: Int!, apiKey: String!): null
|
||||
|
||||
# Update an existing pet
|
||||
# @param Pet body Pet object that needs to be added to the store
|
||||
# @return [null]
|
||||
UpdatePet(body: Pet): null
|
||||
# @param Pet pet Pet object that needs to be added to the store
|
||||
# @return [Pet]
|
||||
UpdatePet(pet: Pet): Pet
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
# @param Int! petId ID of pet that needs to be updated
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
@@ -16,9 +16,9 @@ type mutation {
|
||||
DeleteOrder(orderId: String!): null
|
||||
|
||||
# Place an order for a pet
|
||||
# @param Order body order placed for purchasing the pet
|
||||
# @param Order order order placed for purchasing the pet
|
||||
# @return [Order]
|
||||
PlaceOrder(body: Order): Order
|
||||
PlaceOrder(order: Order): Order
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
type mutation {
|
||||
# Create user
|
||||
# This can only be done by the logged in user.
|
||||
# @param User body Created user object
|
||||
# @param User user Created user object
|
||||
# @return [null]
|
||||
CreateUser(body: User): null
|
||||
CreateUser(user: User): null
|
||||
|
||||
# Creates list of users with given input array
|
||||
# @param [User] body List of user object
|
||||
# @param [User] user List of user object
|
||||
# @return [null]
|
||||
CreateUsersWithArrayInput(body: [User]): null
|
||||
CreateUsersWithArrayInput(user: [User]): null
|
||||
|
||||
# Creates list of users with given input array
|
||||
# @param [User] body List of user object
|
||||
# @param [User] user List of user object
|
||||
# @return [null]
|
||||
CreateUsersWithListInput(body: [User]): null
|
||||
CreateUsersWithListInput(user: [User]): null
|
||||
|
||||
# Delete user
|
||||
# This can only be done by the logged in user.
|
||||
@@ -34,9 +34,9 @@ type mutation {
|
||||
# Updated user
|
||||
# This can only be done by the logged in user.
|
||||
# @param String! username name that need to be deleted
|
||||
# @param User body Updated user object
|
||||
# @param User user Updated user object
|
||||
# @return [null]
|
||||
UpdateUser(username: String!, body: User): null
|
||||
UpdateUser(username: String!, user: User): null
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
type InlineObject {
|
||||
|
||||
# Updated name of the pet
|
||||
name: String!
|
||||
|
||||
# Updated status of the pet
|
||||
status: String!
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
type InlineObject1 {
|
||||
|
||||
# Additional data to pass to server
|
||||
additionalMetadata: String!
|
||||
|
||||
# file to upload
|
||||
file: String!
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenAPI Petstore
|
||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
# OpenAPI spec version: 1.0.0
|
||||
# The version of the OpenAPI document: 1.0.0
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.2.0-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
OpenAPI Petstore
|
||||
|
||||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package petstore;
|
||||
|
||||
|
||||
message InlineObject {
|
||||
|
||||
// Updated name of the pet
|
||||
string name = 1;
|
||||
|
||||
// Updated status of the pet
|
||||
string status = 2;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
OpenAPI Petstore
|
||||
|
||||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package petstore;
|
||||
|
||||
|
||||
message InlineObject1 {
|
||||
|
||||
// Additional data to pass to server
|
||||
string additionalMetadata = 1;
|
||||
|
||||
// file to upload
|
||||
string file = 2;
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import public "models/api_response.proto";
|
||||
import public "models/pet.proto";
|
||||
|
||||
service PetService {
|
||||
rpc AddPet (AddPetRequest) returns (google.protobuf.Empty);
|
||||
rpc AddPet (AddPetRequest) returns (Pet);
|
||||
|
||||
rpc DeletePet (DeletePetRequest) returns (google.protobuf.Empty);
|
||||
|
||||
@@ -27,7 +27,7 @@ service PetService {
|
||||
|
||||
rpc GetPetById (GetPetByIdRequest) returns (Pet);
|
||||
|
||||
rpc UpdatePet (UpdatePetRequest) returns (google.protobuf.Empty);
|
||||
rpc UpdatePet (UpdatePetRequest) returns (Pet);
|
||||
|
||||
rpc UpdatePetWithForm (UpdatePetWithFormRequest) returns (google.protobuf.Empty);
|
||||
|
||||
@@ -37,7 +37,7 @@ service PetService {
|
||||
|
||||
message AddPetRequest {
|
||||
// Pet object that needs to be added to the store
|
||||
Pet body = 1;
|
||||
Pet pet = 1;
|
||||
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ message GetPetByIdRequest {
|
||||
|
||||
message UpdatePetRequest {
|
||||
// Pet object that needs to be added to the store
|
||||
Pet body = 1;
|
||||
Pet pet = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ message GetOrderByIdRequest {
|
||||
|
||||
message PlaceOrderRequest {
|
||||
// order placed for purchasing the pet
|
||||
Order body = 1;
|
||||
Order order = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,19 +36,19 @@ service UserService {
|
||||
|
||||
message CreateUserRequest {
|
||||
// Created user object
|
||||
User body = 1;
|
||||
User user = 1;
|
||||
|
||||
}
|
||||
|
||||
message CreateUsersWithArrayInputRequest {
|
||||
// List of user object
|
||||
repeated User body = 1;
|
||||
repeated User user = 1;
|
||||
|
||||
}
|
||||
|
||||
message CreateUsersWithListInputRequest {
|
||||
// List of user object
|
||||
repeated User body = 1;
|
||||
repeated User user = 1;
|
||||
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ message UpdateUserRequest {
|
||||
// name that need to be deleted
|
||||
string username = 1;
|
||||
// Updated user object
|
||||
User body = 2;
|
||||
User user = 2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
--
|
||||
-- SELECT template for table `AdditionalPropertiesClass`
|
||||
--
|
||||
SELECT `map_string`, `map_number`, `map_integer`, `map_boolean`, `map_array_integer`, `map_array_anytype`, `map_map_string`, `map_map_anytype`, `anytype_1`, `anytype_2`, `anytype_3` FROM `AdditionalPropertiesClass` WHERE 1;
|
||||
SELECT `map_property`, `map_of_map_property` FROM `AdditionalPropertiesClass` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `AdditionalPropertiesClass`
|
||||
--
|
||||
INSERT INTO `AdditionalPropertiesClass`(`map_string`, `map_number`, `map_integer`, `map_boolean`, `map_array_integer`, `map_array_anytype`, `map_map_string`, `map_map_anytype`, `anytype_1`, `anytype_2`, `anytype_3`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
|
||||
INSERT INTO `AdditionalPropertiesClass`(`map_property`, `map_of_map_property`) VALUES (?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `AdditionalPropertiesClass`
|
||||
--
|
||||
UPDATE `AdditionalPropertiesClass` SET `map_string` = ?, `map_number` = ?, `map_integer` = ?, `map_boolean` = ?, `map_array_integer` = ?, `map_array_anytype` = ?, `map_map_string` = ?, `map_map_anytype` = ?, `anytype_1` = ?, `anytype_2` = ?, `anytype_3` = ? WHERE 1;
|
||||
UPDATE `AdditionalPropertiesClass` SET `map_property` = ?, `map_of_map_property` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `AdditionalPropertiesClass`
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
--
|
||||
-- SELECT template for table `Enum_Test`
|
||||
--
|
||||
SELECT `enum_string`, `enum_string_required`, `enum_integer`, `enum_number`, `outerEnum` FROM `Enum_Test` WHERE 1;
|
||||
SELECT `enum_string`, `enum_string_required`, `enum_integer`, `enum_number`, `outerEnum`, `outerEnumInteger`, `outerEnumDefaultValue`, `outerEnumIntegerDefaultValue` FROM `Enum_Test` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `Enum_Test`
|
||||
--
|
||||
INSERT INTO `Enum_Test`(`enum_string`, `enum_string_required`, `enum_integer`, `enum_number`, `outerEnum`) VALUES (?, ?, ?, ?, ?);
|
||||
INSERT INTO `Enum_Test`(`enum_string`, `enum_string_required`, `enum_integer`, `enum_number`, `outerEnum`, `outerEnumInteger`, `outerEnumDefaultValue`, `outerEnumIntegerDefaultValue`) VALUES (?, ?, ?, ?, ?, ?, ?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `Enum_Test`
|
||||
--
|
||||
UPDATE `Enum_Test` SET `enum_string` = ?, `enum_string_required` = ?, `enum_integer` = ?, `enum_number` = ?, `outerEnum` = ? WHERE 1;
|
||||
UPDATE `Enum_Test` SET `enum_string` = ?, `enum_string_required` = ?, `enum_integer` = ?, `enum_number` = ?, `outerEnum` = ?, `outerEnumInteger` = ?, `outerEnumDefaultValue` = ?, `outerEnumIntegerDefaultValue` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `Enum_Test`
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/Foo.sql
Normal file
26
samples/schema/petstore/mysql/Model/Foo.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'Foo' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `Foo`
|
||||
--
|
||||
SELECT `bar` FROM `Foo` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `Foo`
|
||||
--
|
||||
INSERT INTO `Foo`(`bar`) VALUES (?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `Foo`
|
||||
--
|
||||
UPDATE `Foo` SET `bar` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `Foo`
|
||||
--
|
||||
DELETE FROM `Foo` WHERE 0;
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
--
|
||||
-- SELECT template for table `format_test`
|
||||
--
|
||||
SELECT `integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `BigDecimal` FROM `format_test` WHERE 1;
|
||||
SELECT `integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter` FROM `format_test` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `format_test`
|
||||
--
|
||||
INSERT INTO `format_test`(`integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `BigDecimal`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
|
||||
INSERT INTO `format_test`(`integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `format_test`
|
||||
--
|
||||
UPDATE `format_test` SET `integer` = ?, `int32` = ?, `int64` = ?, `number` = ?, `float` = ?, `double` = ?, `string` = ?, `byte` = ?, `binary` = ?, `date` = ?, `dateTime` = ?, `uuid` = ?, `password` = ?, `BigDecimal` = ? WHERE 1;
|
||||
UPDATE `format_test` SET `integer` = ?, `int32` = ?, `int64` = ?, `number` = ?, `float` = ?, `double` = ?, `string` = ?, `byte` = ?, `binary` = ?, `date` = ?, `dateTime` = ?, `uuid` = ?, `password` = ?, `pattern_with_digits` = ?, `pattern_with_digits_and_delimiter` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `format_test`
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/HealthCheckResult.sql
Normal file
26
samples/schema/petstore/mysql/Model/HealthCheckResult.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'HealthCheckResult' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `HealthCheckResult`
|
||||
--
|
||||
SELECT `NullableMessage` FROM `HealthCheckResult` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `HealthCheckResult`
|
||||
--
|
||||
INSERT INTO `HealthCheckResult`(`NullableMessage`) VALUES (?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `HealthCheckResult`
|
||||
--
|
||||
UPDATE `HealthCheckResult` SET `NullableMessage` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `HealthCheckResult`
|
||||
--
|
||||
DELETE FROM `HealthCheckResult` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/InlineObject.sql
Normal file
26
samples/schema/petstore/mysql/Model/InlineObject.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'inline_object' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `inline_object`
|
||||
--
|
||||
SELECT `name`, `status` FROM `inline_object` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `inline_object`
|
||||
--
|
||||
INSERT INTO `inline_object`(`name`, `status`) VALUES (?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `inline_object`
|
||||
--
|
||||
UPDATE `inline_object` SET `name` = ?, `status` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `inline_object`
|
||||
--
|
||||
DELETE FROM `inline_object` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/InlineObject1.sql
Normal file
26
samples/schema/petstore/mysql/Model/InlineObject1.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'inline_object_1' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `inline_object_1`
|
||||
--
|
||||
SELECT `additionalMetadata`, `file` FROM `inline_object_1` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `inline_object_1`
|
||||
--
|
||||
INSERT INTO `inline_object_1`(`additionalMetadata`, `file`) VALUES (?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `inline_object_1`
|
||||
--
|
||||
UPDATE `inline_object_1` SET `additionalMetadata` = ?, `file` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `inline_object_1`
|
||||
--
|
||||
DELETE FROM `inline_object_1` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/InlineObject2.sql
Normal file
26
samples/schema/petstore/mysql/Model/InlineObject2.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'inline_object_2' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `inline_object_2`
|
||||
--
|
||||
SELECT `enum_form_string_array`, `enum_form_string` FROM `inline_object_2` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `inline_object_2`
|
||||
--
|
||||
INSERT INTO `inline_object_2`(`enum_form_string_array`, `enum_form_string`) VALUES (?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `inline_object_2`
|
||||
--
|
||||
UPDATE `inline_object_2` SET `enum_form_string_array` = ?, `enum_form_string` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `inline_object_2`
|
||||
--
|
||||
DELETE FROM `inline_object_2` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/InlineObject3.sql
Normal file
26
samples/schema/petstore/mysql/Model/InlineObject3.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'inline_object_3' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `inline_object_3`
|
||||
--
|
||||
SELECT `integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `pattern_without_delimiter`, `byte`, `binary`, `date`, `dateTime`, `password`, `callback` FROM `inline_object_3` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `inline_object_3`
|
||||
--
|
||||
INSERT INTO `inline_object_3`(`integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `pattern_without_delimiter`, `byte`, `binary`, `date`, `dateTime`, `password`, `callback`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `inline_object_3`
|
||||
--
|
||||
UPDATE `inline_object_3` SET `integer` = ?, `int32` = ?, `int64` = ?, `number` = ?, `float` = ?, `double` = ?, `string` = ?, `pattern_without_delimiter` = ?, `byte` = ?, `binary` = ?, `date` = ?, `dateTime` = ?, `password` = ?, `callback` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `inline_object_3`
|
||||
--
|
||||
DELETE FROM `inline_object_3` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/InlineObject4.sql
Normal file
26
samples/schema/petstore/mysql/Model/InlineObject4.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'inline_object_4' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `inline_object_4`
|
||||
--
|
||||
SELECT `param`, `param2` FROM `inline_object_4` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `inline_object_4`
|
||||
--
|
||||
INSERT INTO `inline_object_4`(`param`, `param2`) VALUES (?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `inline_object_4`
|
||||
--
|
||||
UPDATE `inline_object_4` SET `param` = ?, `param2` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `inline_object_4`
|
||||
--
|
||||
DELETE FROM `inline_object_4` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/InlineObject5.sql
Normal file
26
samples/schema/petstore/mysql/Model/InlineObject5.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'inline_object_5' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `inline_object_5`
|
||||
--
|
||||
SELECT `additionalMetadata`, `requiredFile` FROM `inline_object_5` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `inline_object_5`
|
||||
--
|
||||
INSERT INTO `inline_object_5`(`additionalMetadata`, `requiredFile`) VALUES (?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `inline_object_5`
|
||||
--
|
||||
UPDATE `inline_object_5` SET `additionalMetadata` = ?, `requiredFile` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `inline_object_5`
|
||||
--
|
||||
DELETE FROM `inline_object_5` WHERE 0;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'inline_response_default' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `inline_response_default`
|
||||
--
|
||||
SELECT `string` FROM `inline_response_default` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `inline_response_default`
|
||||
--
|
||||
INSERT INTO `inline_response_default`(`string`) VALUES (?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `inline_response_default`
|
||||
--
|
||||
UPDATE `inline_response_default` SET `string` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `inline_response_default`
|
||||
--
|
||||
DELETE FROM `inline_response_default` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/NullableClass.sql
Normal file
26
samples/schema/petstore/mysql/Model/NullableClass.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'NullableClass' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `NullableClass`
|
||||
--
|
||||
SELECT `integer_prop`, `number_prop`, `boolean_prop`, `string_prop`, `date_prop`, `datetime_prop`, `array_nullable_prop`, `array_and_items_nullable_prop`, `array_items_nullable`, `object_nullable_prop`, `object_and_items_nullable_prop`, `object_items_nullable` FROM `NullableClass` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `NullableClass`
|
||||
--
|
||||
INSERT INTO `NullableClass`(`integer_prop`, `number_prop`, `boolean_prop`, `string_prop`, `date_prop`, `datetime_prop`, `array_nullable_prop`, `array_and_items_nullable_prop`, `array_items_nullable`, `object_nullable_prop`, `object_and_items_nullable_prop`, `object_items_nullable`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `NullableClass`
|
||||
--
|
||||
UPDATE `NullableClass` SET `integer_prop` = ?, `number_prop` = ?, `boolean_prop` = ?, `string_prop` = ?, `date_prop` = ?, `datetime_prop` = ?, `array_nullable_prop` = ?, `array_and_items_nullable_prop` = ?, `array_items_nullable` = ?, `object_nullable_prop` = ?, `object_and_items_nullable_prop` = ?, `object_items_nullable` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `NullableClass`
|
||||
--
|
||||
DELETE FROM `NullableClass` WHERE 0;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'OuterEnumDefaultValue' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `OuterEnumDefaultValue`
|
||||
--
|
||||
SELECT FROM `OuterEnumDefaultValue` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `OuterEnumDefaultValue`
|
||||
--
|
||||
INSERT INTO `OuterEnumDefaultValue`() VALUES ();
|
||||
|
||||
--
|
||||
-- UPDATE template for table `OuterEnumDefaultValue`
|
||||
--
|
||||
UPDATE `OuterEnumDefaultValue` SET WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `OuterEnumDefaultValue`
|
||||
--
|
||||
DELETE FROM `OuterEnumDefaultValue` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/OuterEnumInteger.sql
Normal file
26
samples/schema/petstore/mysql/Model/OuterEnumInteger.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'OuterEnumInteger' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `OuterEnumInteger`
|
||||
--
|
||||
SELECT FROM `OuterEnumInteger` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `OuterEnumInteger`
|
||||
--
|
||||
INSERT INTO `OuterEnumInteger`() VALUES ();
|
||||
|
||||
--
|
||||
-- UPDATE template for table `OuterEnumInteger`
|
||||
--
|
||||
UPDATE `OuterEnumInteger` SET WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `OuterEnumInteger`
|
||||
--
|
||||
DELETE FROM `OuterEnumInteger` WHERE 0;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for 'OuterEnumIntegerDefaultValue' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `OuterEnumIntegerDefaultValue`
|
||||
--
|
||||
SELECT FROM `OuterEnumIntegerDefaultValue` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `OuterEnumIntegerDefaultValue`
|
||||
--
|
||||
INSERT INTO `OuterEnumIntegerDefaultValue`() VALUES ();
|
||||
|
||||
--
|
||||
-- UPDATE template for table `OuterEnumIntegerDefaultValue`
|
||||
--
|
||||
UPDATE `OuterEnumIntegerDefaultValue` SET WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `OuterEnumIntegerDefaultValue`
|
||||
--
|
||||
DELETE FROM `OuterEnumIntegerDefaultValue` WHERE 0;
|
||||
|
||||
26
samples/schema/petstore/mysql/Model/SpecialModelName.sql
Normal file
26
samples/schema/petstore/mysql/Model/SpecialModelName.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- OpenAPI Petstore.
|
||||
-- Prepared SQL queries for '_special_model.name_' definition.
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- SELECT template for table `_special_model.name_`
|
||||
--
|
||||
SELECT `$special[property.name]` FROM `_special_model.name_` WHERE 1;
|
||||
|
||||
--
|
||||
-- INSERT template for table `_special_model.name_`
|
||||
--
|
||||
INSERT INTO `_special_model.name_`(`$special[property.name]`) VALUES (?);
|
||||
|
||||
--
|
||||
-- UPDATE template for table `_special_model.name_`
|
||||
--
|
||||
UPDATE `_special_model.name_` SET `$special[property.name]` = ? WHERE 1;
|
||||
|
||||
--
|
||||
-- DELETE template for table `_special_model.name_`
|
||||
--
|
||||
DELETE FROM `_special_model.name_` WHERE 0;
|
||||
|
||||
@@ -5,14 +5,6 @@
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `$special[model.name]` generated from model 'DollarspecialLeft_Square_BracketmodelPeriodnameRight_Square_Bracket'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `$special[model.name]` (
|
||||
`$special[property.name]` BIGINT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `200_response` generated from model '200Underscoreresponse'
|
||||
-- Model for testing model name starting with number
|
||||
@@ -23,78 +15,13 @@ CREATE TABLE IF NOT EXISTS `200_response` (
|
||||
`class` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Model for testing model name starting with number';
|
||||
|
||||
--
|
||||
-- Table structure for table `AdditionalPropertiesAnyType` generated from model 'AdditionalPropertiesAnyType'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AdditionalPropertiesAnyType` (
|
||||
`name` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `AdditionalPropertiesArray` generated from model 'AdditionalPropertiesArray'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AdditionalPropertiesArray` (
|
||||
`name` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `AdditionalPropertiesBoolean` generated from model 'AdditionalPropertiesBoolean'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AdditionalPropertiesBoolean` (
|
||||
`name` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `AdditionalPropertiesClass` generated from model 'AdditionalPropertiesClass'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AdditionalPropertiesClass` (
|
||||
`map_string` JSON DEFAULT NULL,
|
||||
`map_number` JSON DEFAULT NULL,
|
||||
`map_integer` JSON DEFAULT NULL,
|
||||
`map_boolean` JSON DEFAULT NULL,
|
||||
`map_array_integer` JSON DEFAULT NULL,
|
||||
`map_array_anytype` JSON DEFAULT NULL,
|
||||
`map_map_string` JSON DEFAULT NULL,
|
||||
`map_map_anytype` JSON DEFAULT NULL,
|
||||
`anytype_1` JSON DEFAULT NULL,
|
||||
`anytype_2` JSON DEFAULT NULL,
|
||||
`anytype_3` JSON DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `AdditionalPropertiesInteger` generated from model 'AdditionalPropertiesInteger'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AdditionalPropertiesInteger` (
|
||||
`name` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `AdditionalPropertiesNumber` generated from model 'AdditionalPropertiesNumber'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AdditionalPropertiesNumber` (
|
||||
`name` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `AdditionalPropertiesObject` generated from model 'AdditionalPropertiesObject'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AdditionalPropertiesObject` (
|
||||
`name` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `AdditionalPropertiesString` generated from model 'AdditionalPropertiesString'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AdditionalPropertiesString` (
|
||||
`name` TEXT DEFAULT NULL
|
||||
`map_property` JSON DEFAULT NULL,
|
||||
`map_of_map_property` JSON DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
@@ -142,25 +69,6 @@ CREATE TABLE IF NOT EXISTS `ArrayTest` (
|
||||
`array_array_of_model` JSON DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `BigCat` generated from model 'BigCat'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `BigCat` (
|
||||
`className` TEXT NOT NULL,
|
||||
`color` TEXT,
|
||||
`declawed` TINYINT(1) DEFAULT NULL,
|
||||
`kind` ENUM('lions', 'tigers', 'leopards', 'jaguars') DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `BigCat_allOf` generated from model 'BigCatUnderscoreallOf'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `BigCat_allOf` (
|
||||
`kind` ENUM('lions', 'tigers', 'leopards', 'jaguars') DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `Capitalization` generated from model 'Capitalization'
|
||||
--
|
||||
@@ -254,7 +162,10 @@ CREATE TABLE IF NOT EXISTS `Enum_Test` (
|
||||
`enum_string_required` ENUM('UPPER', 'lower', '') NOT NULL,
|
||||
`enum_integer` ENUM('1', '-1') DEFAULT NULL,
|
||||
`enum_number` ENUM('1.1', '-1.2') DEFAULT NULL,
|
||||
`outerEnum` TEXT DEFAULT NULL
|
||||
`outerEnum` TEXT DEFAULT NULL,
|
||||
`outerEnumInteger` TEXT DEFAULT NULL,
|
||||
`outerEnumDefaultValue` TEXT DEFAULT NULL,
|
||||
`outerEnumIntegerDefaultValue` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
@@ -275,6 +186,14 @@ CREATE TABLE IF NOT EXISTS `FileSchemaTestClass` (
|
||||
`files` JSON DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `Foo` generated from model 'Foo'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `Foo` (
|
||||
`bar` TEXT
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `format_test` generated from model 'formatUnderscoretest'
|
||||
--
|
||||
@@ -293,7 +212,8 @@ CREATE TABLE IF NOT EXISTS `format_test` (
|
||||
`dateTime` DATETIME DEFAULT NULL,
|
||||
`uuid` TEXT DEFAULT NULL,
|
||||
`password` VARCHAR(64) NOT NULL,
|
||||
`BigDecimal` DECIMAL(20, 9) DEFAULT NULL
|
||||
`pattern_with_digits` TEXT DEFAULT NULL COMMENT 'A string that is a 10 digit number. Can have leading zeros.',
|
||||
`pattern_with_digits_and_delimiter` TEXT DEFAULT NULL COMMENT 'A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
@@ -305,6 +225,89 @@ CREATE TABLE IF NOT EXISTS `hasOnlyReadOnly` (
|
||||
`foo` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `HealthCheckResult` generated from model 'HealthCheckResult'
|
||||
-- Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `HealthCheckResult` (
|
||||
`NullableMessage` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.';
|
||||
|
||||
--
|
||||
-- Table structure for table `inline_object` generated from model 'inlineUnderscoreobject'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `inline_object` (
|
||||
`name` TEXT DEFAULT NULL COMMENT 'Updated name of the pet',
|
||||
`status` TEXT DEFAULT NULL COMMENT 'Updated status of the pet'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `inline_object_1` generated from model 'inlineUnderscoreobjectUnderscore1'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `inline_object_1` (
|
||||
`additionalMetadata` TEXT DEFAULT NULL COMMENT 'Additional data to pass to server',
|
||||
`file` MEDIUMBLOB DEFAULT NULL COMMENT 'file to upload'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `inline_object_2` generated from model 'inlineUnderscoreobjectUnderscore2'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `inline_object_2` (
|
||||
`enum_form_string_array` JSON DEFAULT NULL COMMENT 'Form parameter enum test (string array)',
|
||||
`enum_form_string` ENUM('_abc', '-efg', '(xyz)') DEFAULT '-efg' COMMENT 'Form parameter enum test (string)'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `inline_object_3` generated from model 'inlineUnderscoreobjectUnderscore3'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `inline_object_3` (
|
||||
`integer` TINYINT UNSIGNED DEFAULT NULL COMMENT 'None',
|
||||
`int32` TINYINT UNSIGNED DEFAULT NULL COMMENT 'None',
|
||||
`int64` BIGINT DEFAULT NULL COMMENT 'None',
|
||||
`number` DECIMAL(20, 9) UNSIGNED NOT NULL COMMENT 'None',
|
||||
`float` DECIMAL(20, 9) DEFAULT NULL COMMENT 'None',
|
||||
`double` DECIMAL(20, 9) UNSIGNED NOT NULL COMMENT 'None',
|
||||
`string` TEXT DEFAULT NULL COMMENT 'None',
|
||||
`pattern_without_delimiter` TEXT NOT NULL COMMENT 'None',
|
||||
`byte` MEDIUMBLOB NOT NULL COMMENT 'None',
|
||||
`binary` MEDIUMBLOB DEFAULT NULL COMMENT 'None',
|
||||
`date` DATE DEFAULT NULL COMMENT 'None',
|
||||
`dateTime` DATETIME DEFAULT NULL COMMENT 'None',
|
||||
`password` VARCHAR(64) DEFAULT NULL COMMENT 'None',
|
||||
`callback` TEXT DEFAULT NULL COMMENT 'None'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `inline_object_4` generated from model 'inlineUnderscoreobjectUnderscore4'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `inline_object_4` (
|
||||
`param` TEXT NOT NULL COMMENT 'field1',
|
||||
`param2` TEXT NOT NULL COMMENT 'field2'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `inline_object_5` generated from model 'inlineUnderscoreobjectUnderscore5'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `inline_object_5` (
|
||||
`additionalMetadata` TEXT DEFAULT NULL COMMENT 'Additional data to pass to server',
|
||||
`requiredFile` MEDIUMBLOB NOT NULL COMMENT 'file to upload'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `inline_response_default` generated from model 'inlineUnderscoreresponseUnderscoredefault'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `inline_response_default` (
|
||||
`string` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `List` generated from model 'List'
|
||||
--
|
||||
@@ -346,6 +349,25 @@ CREATE TABLE IF NOT EXISTS `Name` (
|
||||
`123Number` INT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Model for testing model name same as property name';
|
||||
|
||||
--
|
||||
-- Table structure for table `NullableClass` generated from model 'NullableClass'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `NullableClass` (
|
||||
`integer_prop` INT DEFAULT NULL,
|
||||
`number_prop` DECIMAL(20, 9) DEFAULT NULL,
|
||||
`boolean_prop` TINYINT(1) DEFAULT NULL,
|
||||
`string_prop` TEXT DEFAULT NULL,
|
||||
`date_prop` DATE DEFAULT NULL,
|
||||
`datetime_prop` DATETIME DEFAULT NULL,
|
||||
`array_nullable_prop` JSON DEFAULT NULL,
|
||||
`array_and_items_nullable_prop` JSON DEFAULT NULL,
|
||||
`array_items_nullable` JSON DEFAULT NULL,
|
||||
`object_nullable_prop` JSON DEFAULT NULL,
|
||||
`object_and_items_nullable_prop` JSON DEFAULT NULL,
|
||||
`object_items_nullable` JSON DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `NumberOnly` generated from model 'NumberOnly'
|
||||
--
|
||||
@@ -408,6 +430,14 @@ CREATE TABLE IF NOT EXISTS `Return` (
|
||||
`return` INT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Model for testing reserved words';
|
||||
|
||||
--
|
||||
-- Table structure for table `_special_model.name_` generated from model 'UnderscorespecialUnderscoremodelPeriodnameUnderscore'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `_special_model.name_` (
|
||||
`$special[property.name]` BIGINT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `Tag` generated from model 'Tag'
|
||||
--
|
||||
@@ -417,31 +447,6 @@ CREATE TABLE IF NOT EXISTS `Tag` (
|
||||
`name` TEXT DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `TypeHolderDefault` generated from model 'TypeHolderDefault'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `TypeHolderDefault` (
|
||||
`string_item` TEXT NOT NULL,
|
||||
`number_item` DECIMAL(20, 9) NOT NULL,
|
||||
`integer_item` INT NOT NULL,
|
||||
`bool_item` TINYINT(1) NOT NULL,
|
||||
`array_item` JSON NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `TypeHolderExample` generated from model 'TypeHolderExample'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `TypeHolderExample` (
|
||||
`string_item` TEXT NOT NULL,
|
||||
`number_item` DECIMAL(20, 9) NOT NULL,
|
||||
`float_item` DECIMAL(20, 9) NOT NULL,
|
||||
`integer_item` INT NOT NULL,
|
||||
`bool_item` TINYINT(1) NOT NULL,
|
||||
`array_item` JSON NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `User` generated from model 'User'
|
||||
--
|
||||
@@ -457,42 +462,6 @@ CREATE TABLE IF NOT EXISTS `User` (
|
||||
`userStatus` INT DEFAULT NULL COMMENT 'User Status'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `XmlItem` generated from model 'XmlItem'
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `XmlItem` (
|
||||
`attribute_string` TEXT DEFAULT NULL,
|
||||
`attribute_number` DECIMAL(20, 9) DEFAULT NULL,
|
||||
`attribute_integer` INT DEFAULT NULL,
|
||||
`attribute_boolean` TINYINT(1) DEFAULT NULL,
|
||||
`wrapped_array` JSON DEFAULT NULL,
|
||||
`name_string` TEXT DEFAULT NULL,
|
||||
`name_number` DECIMAL(20, 9) DEFAULT NULL,
|
||||
`name_integer` INT DEFAULT NULL,
|
||||
`name_boolean` TINYINT(1) DEFAULT NULL,
|
||||
`name_array` JSON DEFAULT NULL,
|
||||
`name_wrapped_array` JSON DEFAULT NULL,
|
||||
`prefix_string` TEXT DEFAULT NULL,
|
||||
`prefix_number` DECIMAL(20, 9) DEFAULT NULL,
|
||||
`prefix_integer` INT DEFAULT NULL,
|
||||
`prefix_boolean` TINYINT(1) DEFAULT NULL,
|
||||
`prefix_array` JSON DEFAULT NULL,
|
||||
`prefix_wrapped_array` JSON DEFAULT NULL,
|
||||
`namespace_string` TEXT DEFAULT NULL,
|
||||
`namespace_number` DECIMAL(20, 9) DEFAULT NULL,
|
||||
`namespace_integer` INT DEFAULT NULL,
|
||||
`namespace_boolean` TINYINT(1) DEFAULT NULL,
|
||||
`namespace_array` JSON DEFAULT NULL,
|
||||
`namespace_wrapped_array` JSON DEFAULT NULL,
|
||||
`prefix_ns_string` TEXT DEFAULT NULL,
|
||||
`prefix_ns_number` DECIMAL(20, 9) DEFAULT NULL,
|
||||
`prefix_ns_integer` INT DEFAULT NULL,
|
||||
`prefix_ns_boolean` TINYINT(1) DEFAULT NULL,
|
||||
`prefix_ns_array` JSON DEFAULT NULL,
|
||||
`prefix_ns_wrapped_array` JSON DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
|
||||
--
|
||||
-- OAuth2 framework tables
|
||||
|
||||
Reference in New Issue
Block a user