W
W
web_dev2018-01-29 17:16:30
Java
web_dev, 2018-01-29 17:16:30

Mock server with auto generated objects from Swagger specification?

Hello, I would like to automate the work process in general and with the frontend as much as possible.
I used to use both Swagger and Blueprint, but a lot has changed in 2-3 years, so I read and the puzzle does not add up 100% yet, so I ask you to help me understand.
The idea is to pack all the specifications generated using swagger to the server somehow, based on the specification, automatically generate mock objects.
Now I read that an Open API has appeared, the basis of which is swagger. But swagger is still a very lively project.
1. What is the best way to organize / make auto-generation of objects for the frontend based on swagger.json?
2. What library would you recommend?
Googled this https://github.com/subeeshcbabu/swagmock/blob/mast...and this one.
I don't want to create mock objects with handles.
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
StepEv, 2018-02-08
@StepEv

https://github.com/swagger-api/swagger-codegen/wik...
There are a bunch of services that will automatically do the same without you having to deploy it yourself:
https://swaggerhub.com
https://apiblueprint.org /tools.html
https://getsandbox.com/
https://www.getpostman.com/docs/postman/mock_serve...

U
unchase, 2019-06-06
@unchase

You can use the Unchase OpenAPI (Swagger) Connected Service extension for Visual Studio 2017/2019 to automatically generate C# or TypeScript code for the client, and C# controller code for the server from the specification file.
In fact, after generating the controller code, you can fill them with the functionality you need, and then call the controller methods from the generated client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question