@readme/oas-examples
Version:
A collection of example OpenAPI 3.x and Swagger 2.0 documents.
57 lines (56 loc) • 1.42 kB
YAML
openapi: 3.0.3
info:
title: x-www-form-urlencoded support
description: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#support-for-x-www-form-urlencoded-request-bodies
version: 1.0.0
servers:
- url: https://httpbin.org
paths:
'/anything':
post:
summary: Demo handling of formData
operationId: demoFormData
requestBody:
content:
application/x-www-form-urlencoded:
schema:
required:
- client_id
- client_secret
type: object
properties:
client_id:
type: string
client_secret:
type: string
scope:
type: integer
format: int32
required: false
responses:
'200':
description: Valid Token
content:
application/json:
schema:
'$ref': '#/components/schemas/Token'
'401':
description: Unauthorized
components:
schemas:
Token:
title: Token
required:
- access_token
- token_type
- expires_in
type: object
properties:
access_token:
type: integer
format: int32
token_type:
type: string
expires_in:
type: integer
format: int32