swagger-api / swagger-api/swagger-codegen
[Haskell] codegen generates fields of type `Date` without importing or declaring `Date`
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Haskell codegen will generate fields of type Date, but will not import or declare Date, leading to stack build failing with errors like Not in scope: type constructor or class ‘Date’.
Swagger-codegen version
2.3.1
Swagger declaration file content or url
http://api.open.fec.gov/swagger
Command line used for generation
swagger-codegen generate -i http://api.open.fec.gov/swagger -l haskell
Steps to reproduce
Assuming haskell-stack installed:
swagger-codegen generate -i http://api.open.fec.gov/swagger -l haskell
stack build
Related issues/PRs
None found
Suggest a fix/enhancement
Generate type Day instead of Date and import Day from package time module Data.Time.
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 failure with swagger-codegen generate -i http://api.open.fec.gov/swagger -l haskell, then run stack build and inspect the generated Haskell code and the Haskell codegen entry point. Done means generated fields use a defined and imported date type so stack build succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100