mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 03:18:53 +00:00
Merge pull request #975 from wing328/sinatra_fix_tag
[Sinatra] Fixed outdated tag in mustache template
This commit is contained in:
commit
3c6f07cbe3
@ -15,18 +15,18 @@ MyApp.add_route('{{httpMethod}}', '{{path}}', {
|
||||
{
|
||||
"name" => "{{paramName}}",
|
||||
"description" => "{{description}}",
|
||||
"dataType" => "{{swaggerDataType}}",
|
||||
"dataType" => "{{dataType}}",
|
||||
"paramType" => "query",
|
||||
"allowMultiple" => {{allowMultiple}},
|
||||
{{#collectionFormat}}"collectionFormat" => "{{collectionFormat}}",{{/collectionFormat}}
|
||||
"allowableValues" => "{{allowableValues}}",
|
||||
{{#defaultValue}}"defaultValue" => {{{defaultValue}}}{{/defaultValue}}
|
||||
{{#defaultValue}}"defaultValue" => "{{{defaultValue}}}"{{/defaultValue}}
|
||||
},
|
||||
{{/queryParams}}
|
||||
{{#pathParams}}
|
||||
{
|
||||
"name" => "{{paramName}}",
|
||||
"description" => "{{description}}",
|
||||
"dataType" => "{{swaggerDataType}}",
|
||||
"dataType" => "{{dataType}}",
|
||||
"paramType" => "path",
|
||||
},
|
||||
{{/pathParams}}
|
||||
@ -34,7 +34,7 @@ MyApp.add_route('{{httpMethod}}', '{{path}}', {
|
||||
{
|
||||
"name" => "{{paramName}}",
|
||||
"description" => "{{description}}",
|
||||
"dataType" => "{{swaggerDataType}}",
|
||||
"dataType" => "{{dataType}}",
|
||||
"paramType" => "header",
|
||||
},
|
||||
{{/headerParams}}
|
||||
@ -42,7 +42,7 @@ MyApp.add_route('{{httpMethod}}', '{{path}}', {
|
||||
{
|
||||
"name" => "body",
|
||||
"description" => "{{description}}",
|
||||
"dataType" => "{{swaggerDataType}}",
|
||||
"dataType" => "{{dataType}}",
|
||||
"paramType" => "body",
|
||||
}
|
||||
{{/bodyParams}}
|
||||
|
@ -3,10 +3,10 @@ require './lib/swaggering'
|
||||
# only need to extend if you want special configuration!
|
||||
class MyApp < Swaggering
|
||||
self.configure do |config|
|
||||
config.api_version = '0.2'
|
||||
config.api_version = '{{version}}'
|
||||
end
|
||||
end
|
||||
|
||||
{{#apis}}
|
||||
require './lib/{{className}}.rb'
|
||||
{{/apis}}
|
||||
{{/apis}}
|
||||
|
@ -16,7 +16,7 @@ MyApp.add_route('PUT', '/pet', {
|
||||
{
|
||||
"name" => "body",
|
||||
"description" => "Pet object that needs to be added to the store",
|
||||
"dataType" => "",
|
||||
"dataType" => "Pet",
|
||||
"paramType" => "body",
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ MyApp.add_route('POST', '/pet', {
|
||||
{
|
||||
"name" => "body",
|
||||
"description" => "Pet object that needs to be added to the store",
|
||||
"dataType" => "",
|
||||
"dataType" => "Pet",
|
||||
"paramType" => "body",
|
||||
}
|
||||
|
||||
@ -67,11 +67,11 @@ MyApp.add_route('GET', '/pet/findByStatus', {
|
||||
{
|
||||
"name" => "status",
|
||||
"description" => "Status values that need to be considered for filter",
|
||||
"dataType" => "",
|
||||
"dataType" => "array[string]",
|
||||
"paramType" => "query",
|
||||
"allowMultiple" => ,
|
||||
"collectionFormat" => "multi",
|
||||
"allowableValues" => "",
|
||||
"defaultValue" => available
|
||||
"defaultValue" => "available"
|
||||
},
|
||||
|
||||
|
||||
@ -97,9 +97,9 @@ MyApp.add_route('GET', '/pet/findByTags', {
|
||||
{
|
||||
"name" => "tags",
|
||||
"description" => "Tags to filter by",
|
||||
"dataType" => "",
|
||||
"dataType" => "array[string]",
|
||||
"paramType" => "query",
|
||||
"allowMultiple" => ,
|
||||
"collectionFormat" => "multi",
|
||||
"allowableValues" => "",
|
||||
|
||||
},
|
||||
@ -128,7 +128,7 @@ MyApp.add_route('GET', '/pet/{petId}', {
|
||||
{
|
||||
"name" => "pet_id",
|
||||
"description" => "ID of pet that needs to be fetched",
|
||||
"dataType" => "",
|
||||
"dataType" => "int",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
@ -155,7 +155,7 @@ MyApp.add_route('POST', '/pet/{petId}', {
|
||||
{
|
||||
"name" => "pet_id",
|
||||
"description" => "ID of pet that needs to be updated",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
@ -182,7 +182,7 @@ MyApp.add_route('DELETE', '/pet/{petId}', {
|
||||
{
|
||||
"name" => "pet_id",
|
||||
"description" => "Pet id to delete",
|
||||
"dataType" => "",
|
||||
"dataType" => "int",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
@ -190,7 +190,7 @@ MyApp.add_route('DELETE', '/pet/{petId}', {
|
||||
{
|
||||
"name" => "api_key",
|
||||
"description" => "",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "header",
|
||||
},
|
||||
|
||||
@ -216,7 +216,7 @@ MyApp.add_route('POST', '/pet/{petId}/uploadImage', {
|
||||
{
|
||||
"name" => "pet_id",
|
||||
"description" => "ID of pet to update",
|
||||
"dataType" => "",
|
||||
"dataType" => "int",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
|
@ -36,7 +36,7 @@ MyApp.add_route('POST', '/store/order', {
|
||||
{
|
||||
"name" => "body",
|
||||
"description" => "order placed for purchasing the pet",
|
||||
"dataType" => "",
|
||||
"dataType" => "Order",
|
||||
"paramType" => "body",
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ MyApp.add_route('GET', '/store/order/{orderId}', {
|
||||
{
|
||||
"name" => "order_id",
|
||||
"description" => "ID of pet that needs to be fetched",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
@ -88,7 +88,7 @@ MyApp.add_route('DELETE', '/store/order/{orderId}', {
|
||||
{
|
||||
"name" => "order_id",
|
||||
"description" => "ID of the order that needs to be deleted",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
|
@ -16,7 +16,7 @@ MyApp.add_route('POST', '/user', {
|
||||
{
|
||||
"name" => "body",
|
||||
"description" => "Created user object",
|
||||
"dataType" => "",
|
||||
"dataType" => "User",
|
||||
"paramType" => "body",
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ MyApp.add_route('POST', '/user/createWithArray', {
|
||||
{
|
||||
"name" => "body",
|
||||
"description" => "List of user object",
|
||||
"dataType" => "",
|
||||
"dataType" => "array[User]",
|
||||
"paramType" => "body",
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ MyApp.add_route('POST', '/user/createWithList', {
|
||||
{
|
||||
"name" => "body",
|
||||
"description" => "List of user object",
|
||||
"dataType" => "",
|
||||
"dataType" => "array[User]",
|
||||
"paramType" => "body",
|
||||
}
|
||||
|
||||
@ -94,9 +94,9 @@ MyApp.add_route('GET', '/user/login', {
|
||||
{
|
||||
"name" => "username",
|
||||
"description" => "The user name for login",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "query",
|
||||
"allowMultiple" => ,
|
||||
|
||||
"allowableValues" => "",
|
||||
|
||||
},
|
||||
@ -104,9 +104,9 @@ MyApp.add_route('GET', '/user/login', {
|
||||
{
|
||||
"name" => "password",
|
||||
"description" => "The password for login in clear text",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "query",
|
||||
"allowMultiple" => ,
|
||||
|
||||
"allowableValues" => "",
|
||||
|
||||
},
|
||||
@ -155,7 +155,7 @@ MyApp.add_route('GET', '/user/{username}', {
|
||||
{
|
||||
"name" => "username",
|
||||
"description" => "The name that needs to be fetched. Use user1 for testing. ",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
@ -182,7 +182,7 @@ MyApp.add_route('PUT', '/user/{username}', {
|
||||
{
|
||||
"name" => "username",
|
||||
"description" => "name that need to be deleted",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
@ -191,7 +191,7 @@ MyApp.add_route('PUT', '/user/{username}', {
|
||||
{
|
||||
"name" => "body",
|
||||
"description" => "Updated user object",
|
||||
"dataType" => "",
|
||||
"dataType" => "User",
|
||||
"paramType" => "body",
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ MyApp.add_route('DELETE', '/user/{username}', {
|
||||
{
|
||||
"name" => "username",
|
||||
"description" => "The name that needs to be deleted",
|
||||
"dataType" => "",
|
||||
"dataType" => "string",
|
||||
"paramType" => "path",
|
||||
},
|
||||
|
||||
|
@ -3,7 +3,7 @@ require './lib/swaggering'
|
||||
# only need to extend if you want special configuration!
|
||||
class MyApp < Swaggering
|
||||
self.configure do |config|
|
||||
config.api_version = '0.2'
|
||||
config.api_version = '1.0.0'
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user