swagger-api / swagger-api/swagger-codegen
[ObjC] core data model mustache file in custom template directory not found
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I use swagger code generator to generate an objective c api client WITH core data. A core data model is generated correctly.
When I switched to a custom template directory to use modified mustache files my modified "model.mustache" is used for generating the classes, but my Model.xcdatamodal.mustache in the same directory is not used instead the embedded is used nevertheless.
Swagger-codegen version
2.4.1 (as this is the last version to support core-data)
Swagger declaration file content or url
- (happens with every yml-file I tried)
Command line used for generation
swagger-codegen generate -i Reisen.yml -l objc -o temp/reisen-coredata -c swagger-codegen-coredata-config.json -t swagger-codegen-templates
Steps to reproduce
- create a custom template directory and copy model.mustache and Model.xcdatamodel.mustache to it.
- modifiy model.mustache and Model.xcdatamodel.mustache and create an objc api client using -t customTemplatedirectory option
- you will find the generated client used the modified model.mustache file but the embedded Model.xcdatamodel.mustache file (at least it does for me)
Related issues/PRs
Suggest a fix/enhancement
I wonder if the custom template directory is only used for model generation and not for supporting file generation?
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
Reproduce the issue with the provided swagger-codegen generate command, using a custom directory containing model.mustache and Model.xcdatamodel.mustache. Compare the generated classes and Core Data model with the modified templates; done means the custom Model.xcdatamodel.mustache is used instead of the embedded template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100