Skip to content

Conversation

wing328
Copy link
Contributor

@wing328 wing328 commented Jan 24, 2018

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

  • Add lua test script
  • minor fix to Lua API files
  • put files under a folder

cc @daurnimator


local {{{packageName}}}= {}
local {{{packageName}}}_mt = {
local {{{classname}}}= {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated style: should add a space before =

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed via 39179a2

@@ -0,0 +1,12 @@
local petstore_client = require "petstore.api.pet_api"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example rather than what I'd call a test: intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, agreed it's more like an example. I'll submit a separate PR with integration tests using https://github.com/bluebird75/luaunit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use busted, not luaunit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll also add auto-generated test files for API and models.

Ref: https://github.com/Olivine-Labs/busted

@wing328 wing328 merged commit df10c72 into master Jan 25, 2018
@wing328 wing328 deleted the lua_improve1 branch January 25, 2018 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants