forked from loafle/openapi-generator-original
Remove outdated comment (#1268)
This commit is contained in:
@@ -49,14 +49,12 @@ function {{classname}}:{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}},
|
||||
req.headers:upsert(":method", "{{httpMethod}}")
|
||||
{{#hasConsumes}}
|
||||
-- TODO: create a function to select proper accept
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_content_type = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }
|
||||
req.headers:upsert("accept", {{#consumes}}{{#-first}}"{{{mediaType}}}"{{/-first}}{{/consumes}})
|
||||
|
||||
{{/hasConsumes}}
|
||||
{{#hasProduces}}
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }
|
||||
req.headers:upsert("content-type", {{#produces}}{{#-first}}"{{{mediaType}}}"{{/-first}}{{/produces}})
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.3.2-SNAPSHOT
|
||||
@@ -18,6 +18,7 @@ local basexx = require "basexx"
|
||||
-- model import
|
||||
local petstore_api_response = require "petstore.model.api_response"
|
||||
local petstore_pet = require "petstore.model.pet"
|
||||
local petstore_pet = require "petstore.model.pet"
|
||||
|
||||
local pet_api = {}
|
||||
local pet_api_mt = {
|
||||
@@ -54,7 +55,6 @@ function pet_api:add_pet(pet)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "POST")
|
||||
-- TODO: create a function to select proper accept
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_content_type = { "application/json", "application/xml" }
|
||||
req.headers:upsert("accept", "application/json")
|
||||
|
||||
@@ -132,7 +132,6 @@ function pet_api:find_pets_by_status(status)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "GET")
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/xml", "application/json" }
|
||||
req.headers:upsert("content-type", "application/xml")
|
||||
|
||||
@@ -185,7 +184,6 @@ function pet_api:find_pets_by_tags(tags)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "GET")
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/xml", "application/json" }
|
||||
req.headers:upsert("content-type", "application/xml")
|
||||
|
||||
@@ -238,7 +236,6 @@ function pet_api:get_pet_by_id(pet_id)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "GET")
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/xml", "application/json" }
|
||||
req.headers:upsert("content-type", "application/xml")
|
||||
|
||||
@@ -288,7 +285,6 @@ function pet_api:update_pet(pet)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "PUT")
|
||||
-- TODO: create a function to select proper accept
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_content_type = { "application/json", "application/xml" }
|
||||
req.headers:upsert("accept", "application/json")
|
||||
|
||||
@@ -329,7 +325,6 @@ function pet_api:update_pet_with_form(pet_id, name, status)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "POST")
|
||||
-- TODO: create a function to select proper accept
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_content_type = { "application/x-www-form-urlencoded" }
|
||||
req.headers:upsert("accept", "application/x-www-form-urlencoded")
|
||||
|
||||
@@ -372,12 +367,10 @@ function pet_api:upload_file(pet_id, additional_metadata, file)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "POST")
|
||||
-- TODO: create a function to select proper accept
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_content_type = { "multipart/form-data" }
|
||||
req.headers:upsert("accept", "multipart/form-data")
|
||||
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/json" }
|
||||
req.headers:upsert("content-type", "application/json")
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ local basexx = require "basexx"
|
||||
|
||||
-- model import
|
||||
local petstore_order = require "petstore.model.order"
|
||||
local petstore_order = require "petstore.model.order"
|
||||
|
||||
local store_api = {}
|
||||
local store_api_mt = {
|
||||
@@ -83,7 +84,6 @@ function store_api:get_inventory()
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "GET")
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/json" }
|
||||
req.headers:upsert("content-type", "application/json")
|
||||
|
||||
@@ -133,7 +133,6 @@ function store_api:get_order_by_id(order_id)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "GET")
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/xml", "application/json" }
|
||||
req.headers:upsert("content-type", "application/xml")
|
||||
|
||||
@@ -179,7 +178,6 @@ function store_api:place_order(order)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "POST")
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/xml", "application/json" }
|
||||
req.headers:upsert("content-type", "application/xml")
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ local basexx = require "basexx"
|
||||
|
||||
-- model import
|
||||
local petstore_user = require "petstore.model.user"
|
||||
local petstore_user = require "petstore.model.user"
|
||||
|
||||
local user_api = {}
|
||||
local user_api_mt = {
|
||||
@@ -179,7 +180,6 @@ function user_api:get_user_by_name(username)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "GET")
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/xml", "application/json" }
|
||||
req.headers:upsert("content-type", "application/xml")
|
||||
|
||||
@@ -225,7 +225,6 @@ function user_api:login_user(username, password)
|
||||
-- set HTTP verb
|
||||
req.headers:upsert(":method", "GET")
|
||||
-- TODO: create a function to select proper content-type
|
||||
-- ref: https://openapi-generator.tech/pull/6252#issuecomment-321199879
|
||||
--local var_accept = { "application/xml", "application/json" }
|
||||
req.headers:upsert("content-type", "application/xml")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user