Skip to content

Instantly share code, notes, and snippets.

@maslade
Last active March 28, 2021 21:17
Show Gist options
  • Save maslade/af4d665e211900956c1ce8eadd2d7e91 to your computer and use it in GitHub Desktop.
Save maslade/af4d665e211900956c1ce8eadd2d7e91 to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: My microservice
# The double quotes are necessary to prevent version from being
# interpreted as a floating point number.
version: "1.0"
paths:
'/api/users/{userId}':
post:
# The tag "Users" will cause this to be generated as a client
# class named UsersApi when using the typescript-fetch generator
# (and possibly others).
tags:
- Users
parameters:
- name: userId
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: 'restTypes.yml#/components/schemas/IUpdateUserRequestBody'
responses:
'200':
description: The updated user.
content:
application/json:
schema:
$ref: 'restTypes.yml#/components/schemas/IUpdateUserResponseBody'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment