DEV Community


Discussion on: Consuming APIs in Angular – The Model-Adapter Pattern

thiltal profile image
Zdeněk Mlčoch

For advanced front-end developers there is a way of generate the adapter part from openApi (swagger) specification. Even a beginner can generate angular project on page It can take part in developer flow so you are warned by typescript compiler if the api has changed.

stereobooster profile image

Also or the big list of similar tools here

crywolfe profile image
Gerry Wolfe

This is similar to what we do at my place of employment.
We build the back-end service in Java, using Spring and Spring/Swagger annotations.
We take the generated front-end controllers and models from Swagger and then, as an example, for a 'get' request, send the return json object to an NGXS state class that we build out and use the model in the state class to set the respective states.

Forem Open with the Forem app