-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webapi-Swagger : Restructure generation of Types from Swagger doc. #31
Labels
Webapi-Swagger
All issues related to Webapi-swagger (generation of Webapi contracts from Swagger Docs)
Comments
kahlil29
added
the
Webapi-Swagger
All issues related to Webapi-swagger (generation of Webapi contracts from Swagger Docs)
label
Apr 1, 2019
Current approach (for collecting types and for generation) is : Store (in state) a Hashmap with the following structure :
After we complete collection/calculation of all types from the Swagger Doc, we will generate the Contract and then do the following steps :
|
kahlil29
moved this from Done
to In progress
in Webapi-Swagger Restructuring Autogen files
Apr 2, 2019
kahlil29
added a commit
that referenced
this issue
Apr 4, 2019
- New Types module, new Types added - State Type changed to add LevelInfo - Replace TypeAlias with HNewType
kahlil29
added a commit
that referenced
this issue
Apr 4, 2019
- Pass Route and Method info into lower stages for proper LevelInfo - Add all generated module names into cabal file
kahlil29
added a commit
that referenced
this issue
Apr 4, 2019
Add wrapper type even if ApiOut or ApiErr are single types. Related to changes for #31
kahlil29
moved this from In progress
to Testing/Review
in Webapi-Swagger Restructuring Autogen files
Apr 4, 2019
kahlil29
moved this from Testing/Review
to Done
in Webapi-Swagger Restructuring Autogen files
Apr 6, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Webapi-Swagger
All issues related to Webapi-swagger (generation of Webapi contracts from Swagger Docs)
This change involves breaking down the generated types into modules.
The planned structure would look like :
Some things we need to take care of while implementing this change :
Contract.hs
)GlobalDefinitions
would need to be imported into all (all routes, all methods) otherTypes.hs
files.ResponseDefinitions.hs
, we would also need to generate theHeader
types (if any are specified in the Swagger Doc) for the global response types (if any)Contract
, we are referring to the correct types at correct places (correct qualification) especially for Params.The text was updated successfully, but these errors were encountered: