-
-
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.
[Lua] Improve auto-generated test files (#7568)
* move lua spec folder, remove extra endline * remove extra line * remove duplicated import
- Loading branch information
Showing
12 changed files
with
90 additions
and
118 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
20 changes: 8 additions & 12 deletions
20
modules/swagger-codegen/src/main/resources/lua/api_test.mustache
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
7 changes: 2 additions & 5 deletions
7
modules/swagger-codegen/src/main/resources/lua/model_test.mustache
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
20 changes: 9 additions & 11 deletions
20
...e/lua/petstore/spec/api_response_spec.lua → ...t/petstore/lua/spec/api_response_spec.lua
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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_api_response = require "petstore.model.api_response" | ||
|
||
--[[ | ||
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() | ||
|
20 changes: 9 additions & 11 deletions
20
...store/lua/petstore/spec/category_spec.lua → ...lient/petstore/lua/spec/category_spec.lua
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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_category = require "petstore.model.category" | ||
|
||
--[[ | ||
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() | ||
|
20 changes: 9 additions & 11 deletions
20
...petstore/lua/petstore/spec/order_spec.lua → ...s/client/petstore/lua/spec/order_spec.lua
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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_order = require "petstore.model.order" | ||
|
||
--[[ | ||
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() | ||
|
19 changes: 8 additions & 11 deletions
19
...tstore/lua/petstore/spec/pet_api_spec.lua → ...client/petstore/lua/spec/pet_api_spec.lua
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 |
---|---|---|
@@ -1,23 +1,20 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_pet_api = require "petstore.api.pet_api" | ||
|
||
--[[ | ||
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() | ||
|
20 changes: 9 additions & 11 deletions
20
...t/petstore/lua/petstore/spec/pet_spec.lua → ...les/client/petstore/lua/spec/pet_spec.lua
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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_pet = require "petstore.model.pet" | ||
|
||
--[[ | ||
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() | ||
|
19 changes: 8 additions & 11 deletions
19
...tore/lua/petstore/spec/store_api_spec.lua → ...ient/petstore/lua/spec/store_api_spec.lua
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 |
---|---|---|
@@ -1,23 +1,20 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_store_api = require "petstore.api.store_api" | ||
|
||
--[[ | ||
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() | ||
|
20 changes: 9 additions & 11 deletions
20
...t/petstore/lua/petstore/spec/tag_spec.lua → ...les/client/petstore/lua/spec/tag_spec.lua
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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_tag = require "petstore.model.tag" | ||
|
||
--[[ | ||
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() | ||
|
19 changes: 8 additions & 11 deletions
19
...store/lua/petstore/spec/user_api_spec.lua → ...lient/petstore/lua/spec/user_api_spec.lua
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 |
---|---|---|
@@ -1,23 +1,20 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_user_api = require "petstore.api.user_api" | ||
|
||
--[[ | ||
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() | ||
|
20 changes: 9 additions & 11 deletions
20
.../petstore/lua/petstore/spec/user_spec.lua → ...es/client/petstore/lua/spec/user_spec.lua
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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
--[[ | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
Swagger Codegen version: 2.4.0-SNAPSHOT | ||
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: [email protected] | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
]] | ||
|
||
local petstore_user = require "petstore.model.user" | ||
|
||
--[[ | ||
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() | ||
|