Skip to content

Instantly share code, notes, and snippets.

@WhiteHyun
Last active June 18, 2024 06:12
Show Gist options
  • Save WhiteHyun/2adefbb2635698cc5c1f71164f85a0ca to your computer and use it in GitHub Desktop.
Save WhiteHyun/2adefbb2635698cc5c1f71164f85a0ca to your computer and use it in GitHub Desktop.
OpenAPI yaml
openapi: "3.1.0"
info:
title: "App"
version: "1.0.0"
servers:
- url: "https://api.path.com/v1"
description: "Production Server"
- url: "https://localhost/v1"
description: "Internal staging server for testing"
paths:
/greet:
get:
operationId: "getGreeting"
parameters:
- name: "name"
required: false
in: "query"
description: "Personalize the greeting."
schema:
type: "string"
responses:
"200":
description: "Returns a greeting."
content:
application/json:
schema:
$ref: "#/components/schemas/Greeting"
components:
schemas:
Greeting:
type: object
description: A value with the greeting contents.
properties:
message:
type: string
description: The string representation of the greeting.
required:
- message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment