Created
March 27, 2023 06:08
-
-
Save rikusen0335/afe53b2c9b16dee83103199a2808fdea to your computer and use it in GitHub Desktop.
Reproducible OpenAPI go-server bug yaml for PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
x-stoplight: | |
id: zifvr6s124si6 | |
info: | |
title: test | |
version: '1.0' | |
servers: | |
- url: 'http://localhost:3000' | |
paths: | |
'/users/{userId}': | |
parameters: | |
- schema: | |
type: integer | |
name: userId | |
in: path | |
required: true | |
description: Id of an existing user. | |
get: | |
summary: Get User Info by User ID | |
tags: [] | |
responses: | |
'200': | |
description: User Found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/User' | |
'404': | |
description: User Not Found | |
operationId: get-users-userId | |
description: Retrieve the information of the user with the matching user ID. | |
patch: | |
summary: Update User Information | |
operationId: patch-users-userId | |
responses: | |
'200': | |
description: User Updated | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/User' | |
'404': | |
description: User Not Found | |
'409': | |
description: Email Already Taken | |
description: Update the information of an existing user. | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
firstName: | |
type: string | |
lastName: | |
type: string | |
email: | |
type: string | |
description: 'If a new email is given, the user''s email verified property will be set to false.' | |
dateOfBirth: | |
type: string | |
scope: | |
x-stoplight: | |
id: 6sfvdvh4kn8if | |
nullable: true | |
allOf: | |
- $ref: '#/components/schemas/GGGScopeEnum' | |
x-stoplight: | |
id: 1dx4ecqjzkims | |
description: Patch user properties to update. | |
/user: | |
post: | |
summary: Create New User | |
operationId: post-user | |
responses: | |
'200': | |
description: User Created | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/User' | |
'400': | |
description: Missing Required Information | |
'409': | |
description: Email Already Taken | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
firstName: | |
type: string | |
lastName: | |
type: string | |
email: | |
type: string | |
dateOfBirth: | |
type: string | |
format: date | |
required: | |
- firstName | |
- lastName | |
- dateOfBirth | |
description: Post the necessary fields for the API to create a new user. | |
description: Create a new user. | |
components: | |
schemas: | |
User: | |
title: User | |
type: object | |
description: '' | |
x-examples: | |
Alice Smith: | |
id: 142 | |
firstName: Alice | |
lastName: Smith | |
email: [email protected] | |
dateOfBirth: '1997-10-31' | |
emailVerified: true | |
signUpDate: '2019-08-24' | |
properties: | |
id: | |
type: integer | |
description: Unique identifier for the given user. | |
firstName: | |
type: string | |
lastName: | |
type: string | |
email: | |
type: string | |
format: email | |
dateOfBirth: | |
type: string | |
format: date | |
example: '1997-10-31' | |
emailVerified: | |
type: boolean | |
description: Set to true if the user's email has been verified. | |
createDate: | |
type: string | |
format: date | |
description: The date that the user was created. | |
required: | |
- id | |
- firstName | |
- lastName | |
- emailVerified | |
GGGDeveloper: | |
title: GGGDeveloper | |
x-stoplight: | |
id: a11msaxcbij2v | |
type: object | |
properties: | |
id: | |
type: string | |
GGGScopeEnum: | |
title: GGGScopeEnum | |
x-stoplight: | |
id: yb75c8ocnu8bx | |
type: string | |
enum: | |
- foo | |
- bar | |
NFTMonster: | |
type: object | |
properties: | |
scope: | |
$ref: '#/components/schemas/GGGDeveloper' | |
x-stoplight: | |
id: y5t7f7nulkb78 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment