Ankit Singh
Ankit Singh

Reputation: 21

Mocking Rest API with Swagger / OpenAPI Documentation

Whole idea is to create Mock service for UI team to test without actual API.

Please suggest some way to generate the same.

Upvotes: 2

Views: 5800

Answers (1)

William Cheng
William Cheng

Reputation: 10807

Given that you've the API documented in Swagger/OpenAPI spec (YAML format), you can use Swagger Codegen to generate Spring boot server stub.

Please pull the latest master of https://github.com/swagger-api/swagger-codegen and follow the instruction in the wiki:

https://github.com/swagger-api/swagger-codegen/wiki/Server-stub-generator-HOWTO#java-springboot

Upvotes: 2

Related Questions