alexjomin / openapi-parser

Simple and still naive openapi documentation generator from comments of your Go code.
18 stars 8 forks source link

feat(docparser): generate components based on jsonapi tags #17

Closed rlespinasse closed 5 years ago

rlespinasse commented 6 years ago

Purpose

The aim of this new feature is to begin the support of the jsonapi tags during the @openapi:schema component generation phase.

The specification format is available at http://jsonapi.org/format/

Overview

Currently, this pull request add support for the data, and includes top-level members of the root of every JSON API request and response containing data document. For a given Foo object, the use of jsonapi tags will generated all components needed to represent the jsonapi format of this object.

Supported top-level members are

The errors objects can be handle by json tags (with an ErrorObject and an ErrorsPayload components)

The meta, jsonapi, links top-level members of the document are not supported in this pull-request.

Others contents needed for the pull request

Others information

The content of this pull-request is currently used at my current work. And a first code review / pair programming on some parts have being done by @denouche (thanks to him)

Related to #18

rlespinasse commented 6 years ago

I move this PR in WIP because of included who need a flag to block the generation in the openapi file (needed to be supported by AWS API Gateway 😭)

rlespinasse commented 5 years ago

@alexjomin the PR is up-to-date

rlespinasse commented 5 years ago

@alexjomin @denouche the PR is up-to-date, I fix the conflict on the README.md file