Skip to content

Commit

Permalink
#118. Add oas topic.yaml file as an example to tests/functional
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurkushman committed Dec 10, 2018
1 parent 473a0e4 commit 5a2765f
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 43 deletions.
71 changes: 71 additions & 0 deletions tests/functional/oas/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,74 @@ components:
type: Type
id: ID
attributes: MenuAttributes
/article:
get:
queryParameters: QueryParams
responses:
200:
body:
application/json.vnd+json:
type: Article[]
post:
body:
application/json.vnd+json:
type: Article
responses:
200:
body:
application/json.vnd+json:
type: Article
/{id}:
get:
responses:
200:
body:
application/json.vnd+json:
type: Article
patch:
body:
application/json.vnd+json:
type: Article
responses:
200:
body:
application/json.vnd+json:
type: Article
delete:
responses:
204:
/relationships/tag:
get:
responses:
200:
body:
application/json.vnd+json:
type: TagRelationships
post:
body:
application/json.vnd+json:
type: TagRelationships
responses:
201:
body:
application/json.vnd+json:
type: TagRelationships
patch:
body:
application/json.vnd+json:
type: TagRelationships
responses:
200:
body:
application/json.vnd+json:
type: TagRelationships
delete:
responses:
204:
/tag:
get:
responses:
200:
body:
application/json.vnd+json:
type: Tag[]
87 changes: 44 additions & 43 deletions tests/functional/oas/topic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,47 @@ servers:
defualt: 80
basePath:
default: v3
types:
ID:
type: integer
required: true
Type:
type: string
required: true
minLength: 1
maxLength: 255
DataObject:
type: object
required: true
DataArray:
type: array
required: true
RelationshipsDataItem:
type: object
properties:
id: ID
type: Type
ArticleRelationships:
type: object
properties:
data:
type: DataArray
items:
type: RelationshipsDataItem
TopicAttributes:
type: object
properties:
title:
required: true
type: string
minLength: 16
maxLength: 256
Topic:
type: object
properties:
type: Type
id: ID
attributes: TopicAttributes
relationships:
type: ArticleRelationships[]
components:
schemas:
ID:
type: integer
required: true
Type:
type: string
required: true
minLength: 1
maxLength: 255
DataObject:
type: object
required: true
DataArray:
type: array
required: true
RelationshipsDataItem:
type: object
properties:
id: ID
type: Type
ArticleRelationships:
type: object
properties:
data:
type: DataArray
items:
type: RelationshipsDataItem
TopicAttributes:
type: object
properties:
title:
required: true
type: string
minLength: 16
maxLength: 256
Topic:
type: object
properties:
type: Type
id: ID
attributes: TopicAttributes
relationships:
type: ArticleRelationships[]

0 comments on commit 5a2765f

Please sign in to comment.