OpenAPITools / OpenAPITools/openapi-generator
[BUG] nodejs-express-server generator does not generate models
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- [ x] Have you provided a full/minimal spec to reproduce the issue?
- [x ] Have you validated the input using an OpenAPI validator (example)?
- [x ] Have you tested with the latest master to confirm the issue still exists?
- [ x] Have you searched for related issues/PRs?
- [x ] What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Cannot replicate the nodejs-express-server sample to generate models.
openapi-generator version
7.4.0
OpenAPI declaration file content or url
Generation Details
See below
Steps to reproduce
- Clone this repo
- Install the CLI tool
npm install @openapitools/openapi-generator-cli - Navigate to
samples/server/petstore/nodejs-express-server - Generate the code
npx openapi-generator-cli generate -g nodejs-express-server -o output -i api/openapi.yaml
Expected Results
A directory output/models will be created matching the contents of https://github.com/OpenAPITools/openapi-generator/tree/master/samples/server/petstore/nodejs-express-server/models
Actual Results
No models directory is created. There are no warnings or errors in the log to indicate the models will not be generated.
Related issues/PRs
There was an issue created and then closed here: https://github.com/OpenAPITools/openapi-generator/issues/12274 but details were not included for their work around.
Suggest a fix
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 samples/server/petstore/nodejs-express-server/api/openapi.yaml and run the documented npx openapi-generator-cli command for the nodejs-express-server generator. Compare the generated output with samples/server/petstore/nodejs-express-server/models; done means output/models is created with the expected model files and no warnings or errors are needed to explain the omission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, java, nodejs, openapi
- Domain
- api, backend, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100