How to create AngularJS client code from a defined Swagger document using Swagger Codegen

2,589 views
Skip to first unread message

Bao Long

unread,
Aug 28, 2015, 5:16:21 AM8/28/15
to Swagger
Hello everyone,

I've just began with Swagger. I aimed to create CRUD operations on this Company entity (2 properties: name & address).
I used Swagger editor to define a Swagger document then picked Node.js to generate server. Now I can use the Swagger UI to explore generated REST API.  I used generate client section on Swagger editor to generate Typescript Angular code, then got 2 files for Company table.


My question is by using Swagger Codegen, how to generate the AngularJS client code + UI to get list, edit, delete company etc.



Ron Ratovsky

unread,
Aug 28, 2015, 8:19:29 AM8/28/15
to Swagger
If the Typescript Angular template is not the one you need, then you can create your own template and use it - https://github.com/swagger-api/swagger-codegen#making-your-own-codegen-modules.

The UI is not generated, you pretty much just use https://github.com/swagger-api/swagger-ui directly.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

Rico Suter

unread,
Jun 1, 2016, 3:15:41 PM6/1/16
to Swagger
You should also have a look at this project: http://nswag.org

wing328

unread,
Jun 3, 2016, 2:28:36 AM6/3/16
to Swagger
Please open a ticket via https://github.com/swagger-api/swagger-codegen/issues

William

Bao Long於 2015年8月28日星期五 UTC+8下午5時16分21秒寫道:
Reply all
Reply to author
Forward
0 new messages