forked from loafle/openapi-generator-original
[Lua] Improve auto-generated test files (#7568)
* move lua spec folder, remove extra endline * remove extra line * remove duplicated import
This commit is contained in:
40
samples/client/petstore/lua/spec/api_response_spec.lua
Normal file
40
samples/client/petstore/lua/spec/api_response_spec.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.model.api_response
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("api_response", function()
|
||||
local petstore_api_response = require "petstore.model.api_response"
|
||||
|
||||
-- unit tests for the property 'code'
|
||||
describe("property code test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'type'
|
||||
describe("property type test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'message'
|
||||
describe("property message test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
33
samples/client/petstore/lua/spec/category_spec.lua
Normal file
33
samples/client/petstore/lua/spec/category_spec.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.model.category
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("category", function()
|
||||
local petstore_category = require "petstore.model.category"
|
||||
|
||||
-- unit tests for the property 'id'
|
||||
describe("property id test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'name'
|
||||
describe("property name test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
61
samples/client/petstore/lua/spec/order_spec.lua
Normal file
61
samples/client/petstore/lua/spec/order_spec.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.model.order
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("order", function()
|
||||
local petstore_order = require "petstore.model.order"
|
||||
|
||||
-- unit tests for the property 'id'
|
||||
describe("property id test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'pet_id'
|
||||
describe("property pet_id test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'quantity'
|
||||
describe("property quantity test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'ship_date'
|
||||
describe("property ship_date test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'status'
|
||||
describe("property status test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'complete'
|
||||
describe("property complete test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
74
samples/client/petstore/lua/spec/pet_api_spec.lua
Normal file
74
samples/client/petstore/lua/spec/pet_api_spec.lua
Normal file
@@ -0,0 +1,74 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.api.pet_api
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("pet_api", function()
|
||||
local petstore_pet_api = require "petstore.api.pet_api"
|
||||
-- unit tests for add_pet
|
||||
describe("add_pet test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for delete_pet
|
||||
describe("delete_pet test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for find_pets_by_status
|
||||
describe("find_pets_by_status test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for find_pets_by_tags
|
||||
describe("find_pets_by_tags test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for get_pet_by_id
|
||||
describe("get_pet_by_id test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for update_pet
|
||||
describe("update_pet test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for update_pet_with_form
|
||||
describe("update_pet_with_form test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for upload_file
|
||||
describe("upload_file test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
61
samples/client/petstore/lua/spec/pet_spec.lua
Normal file
61
samples/client/petstore/lua/spec/pet_spec.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.model.pet
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("pet", function()
|
||||
local petstore_pet = require "petstore.model.pet"
|
||||
|
||||
-- unit tests for the property 'id'
|
||||
describe("property id test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'category'
|
||||
describe("property category test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'name'
|
||||
describe("property name test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'photo_urls'
|
||||
describe("property photo_urls test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'tags'
|
||||
describe("property tags test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'status'
|
||||
describe("property status test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
46
samples/client/petstore/lua/spec/store_api_spec.lua
Normal file
46
samples/client/petstore/lua/spec/store_api_spec.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.api.store_api
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("store_api", function()
|
||||
local petstore_store_api = require "petstore.api.store_api"
|
||||
-- unit tests for delete_order
|
||||
describe("delete_order test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for get_inventory
|
||||
describe("get_inventory test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for get_order_by_id
|
||||
describe("get_order_by_id test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for place_order
|
||||
describe("place_order test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
33
samples/client/petstore/lua/spec/tag_spec.lua
Normal file
33
samples/client/petstore/lua/spec/tag_spec.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.model.tag
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("tag", function()
|
||||
local petstore_tag = require "petstore.model.tag"
|
||||
|
||||
-- unit tests for the property 'id'
|
||||
describe("property id test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'name'
|
||||
describe("property name test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
74
samples/client/petstore/lua/spec/user_api_spec.lua
Normal file
74
samples/client/petstore/lua/spec/user_api_spec.lua
Normal file
@@ -0,0 +1,74 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.api.user_api
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("user_api", function()
|
||||
local petstore_user_api = require "petstore.api.user_api"
|
||||
-- unit tests for create_user
|
||||
describe("create_user test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for create_users_with_array_input
|
||||
describe("create_users_with_array_input test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for create_users_with_list_input
|
||||
describe("create_users_with_list_input test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for delete_user
|
||||
describe("delete_user test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for get_user_by_name
|
||||
describe("get_user_by_name test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for login_user
|
||||
describe("login_user test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for logout_user
|
||||
describe("logout_user test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for update_user
|
||||
describe("update_user test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
75
samples/client/petstore/lua/spec/user_spec.lua
Normal file
75
samples/client/petstore/lua/spec/user_spec.lua
Normal file
@@ -0,0 +1,75 @@
|
||||
--[[
|
||||
Swagger Petstore
|
||||
|
||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
]]
|
||||
|
||||
--[[
|
||||
Unit tests for petstore.model.user
|
||||
Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
||||
Please update as you see appropriate
|
||||
]]
|
||||
describe("user", function()
|
||||
local petstore_user = require "petstore.model.user"
|
||||
|
||||
-- unit tests for the property 'id'
|
||||
describe("property id test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'username'
|
||||
describe("property username test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'first_name'
|
||||
describe("property first_name test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'last_name'
|
||||
describe("property last_name test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'email'
|
||||
describe("property email test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'password'
|
||||
describe("property password test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'phone'
|
||||
describe("property phone test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
-- unit tests for the property 'user_status'
|
||||
describe("property user_status test", function()
|
||||
it("should work", function()
|
||||
-- TODO assertion here: http://olivinelabs.com/busted/#asserts
|
||||
end)
|
||||
end)
|
||||
|
||||
end)
|
||||
Reference in New Issue
Block a user