4. Ingredients
Swagger API docs
need to be supplied by the API provider
can be provided automatically using e.g. Spring Boot +
Swagger-Springfox
see Swagger.io –Tools & Integrations
You can also do “API first“ using Swagger-Editor
Swagger-Codegen
generate client code in 20+ languages
Static Javascript support requested in 2013
… added during dotjs 2015
… available since 2015-12-07 05:00
14. Current state of
Javascript support
API support
Jsdoc comments + type hints
Model support
Jsdoc comments + type hints
Enumeration support
Getter/Setter support
Constructor for required properties
Print using toJson()
Plain JS + AMD usage supported
15. It‘s not yet perfect …
Support forTypescript
data types, inheritance, interfaces, enumerations
More annotations / decorator support
See Java BeanValidationAPI: @NotNull, @Size,
@Min, @Max, …
???
17. Thank you for your
attention!
Swagger-Codegen:
https://github.com/swagger-api/swagger-codegen
(master / scheduled for release 2.1.5)
Full demo for Spring Boot:
Devoxx 2015 @Youtube
Questions?
Contact: @johannes_fiala