swagger-api / swagger-api/swagger-codegen

[Lua] Generated code uses invalid identifiers

Open
#7,941 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.