swagger-api / swagger-api/swagger-codegen
[Lua] Generated code uses invalid identifiers
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Generated lua code uses invalid identifiers
Swagger-codegen version
d58835e57
Steps to reproduce
Generate a file using lua generator
Get code like:
local swagger-client_o_auth_response = require "swagger-client.model.o_auth_response"
That is not a valid lua identifier. (need to e.g. convert - to _)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Lua generator and reproduce the shown output from an OpenAPI or Swagger definition. Trace the invalid identifier back to the generator templates or entry point; done when generated Lua identifiers are valid, including the require example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100