Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenAPI 3.0 mock generator [closed]

I am learning OpenAPI Specification. Are there any tools to mock an API based on an OpenAPI definition in YAML format?

like image 248
Vignesh Avatar asked Nov 26 '25 03:11

Vignesh


2 Answers

SwaggerHub includes a mock server for OpenAPI 3.0 and 2.0 specs. Mocking is available on both paid and free plans.

To use the mock server, import your spec into SwaggerHub and enable "API Auto Mocking". Mock responses can be JSON, YAML and XML, and are generated based on your response schemas and the example, default and enum values defined in the schemas.

Disclosure: I work for the company that develops SwaggerHub.

like image 87
Helen Avatar answered Nov 28 '25 17:11

Helen


I'm currently working to add support on Eclipse Vert.x for automatic request validation and security validation. Check out this blog post i wrote, you can find a complete guide on how to write a rest api service with eclipse vert.x and OAS3. You can also give a look to this gist, there's a complete example. Ping me if you want other infos.

I will add as soon as possible the generator for client and server for Vert.x (i'm waiting swagger-codegen support to OAS 3)

like image 45
Francesco Guardiani Avatar answered Nov 28 '25 15:11

Francesco Guardiani