Are there any generators that support OpenAPI 3?

MattC picture MattC · Sep 19, 2017 · Viewed 7.8k times · Source

At the time of writing this the OpenAPI 3 spec is relatively new. I am struggling to find any documentation generators that support version 3.0.

Does anyone know of generators that support OpenAPI v3.0?

Answer

William Cheng picture William Cheng · Jun 5, 2018

You can try OpenAPI Generator (https://openapi-generator.tech), which supports both OpenAPI spec v2, v3 and released a stable version (3.0.0) a few days ago.

Using docker, you can easily generate the API documentation:

docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \
    -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
    -g html2 \
    -o /local/out/html2