Closed rlespinasse closed 5 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 😭)
@alexjomin the PR is up-to-date
@alexjomin @denouche the PR is up-to-date, I fix the conflict on the README.md
file
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
, andincludes
top-level members of the root of every JSON API request and response containing data document. For a givenFoo
object, the use ofjsonapi
tags will generated all components needed to represent the jsonapi format of this object.Supported top-level members are
data
,includes
(skippable with flag--without-jsonapi-includes
).The
errors
objects can be handle byjson
tags (with anErrorObject
and anErrorsPayload
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
make test
will run dataset testing to validate the usage of the openapi-parser,make check
will run dataset check to swagger convertion,string
attribute in ajson
tag (seedataset/jsontags
),yaml
tag of theserver
struct in docparser/model.go,json
,jsonapi
, andvalidate
separately,Items
fromSchema
now support a single string value OR a array ofSchema
,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