api-spec-converter
Version:
Convert API descriptions between popular formats such as OpenAPI(fka Swagger), RAML, API Blueprint, WADL, etc.
91 lines (89 loc) • 2.16 kB
YAML
definitions:
PetName:
properties:
name:
type: string
nickname:
type: string
x-nullable: true
type: object
info:
title: test
version: 0.0.1
paths:
/foo:
post:
consumes:
- application/json
operationId: getFoo
parameters:
- in: body
name: body
required: true
schema:
properties:
name:
type: string
x-nullable: true
pet:
allOf:
- $ref: '#/definitions/PetName'
- properties:
favorite_foods:
items:
type: string
x-nullable: true
type: array
type: object
type: object
produces:
- application/json
responses:
'200':
description: Foo
schema:
allOf:
- $ref: '#/definitions/PetName'
- properties:
name:
type: string
x-nullable: true
type: object
tags:
- Foos
swagger: '2.0'
x-components:
requestBodies:
FooRequest:
content:
application/json:
schema:
properties:
name:
nullable: true
type: string
pet:
allOf:
- $ref: '#/definitions/PetName'
- properties:
favorite_foods:
items:
nullable: true
type: string
type: array
type: object
type: object
required: true
responses:
FooResponse:
content:
application/json:
schema:
allOf:
- $ref: '#/definitions/PetName'
- properties:
name:
nullable: true
type: string
type: object
description: Foo