Created
January 26, 2024 16:39
-
-
Save evanvin/520b85477a06af85976052975075e3e3 to your computer and use it in GitHub Desktop.
w api openapi schema
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' | |
info: | |
version: '1.0.0' | |
title: 'Wordalike API' | |
description: Base wordalike endpoints | |
paths: | |
/words/: | |
get: | |
summary: Retrieves the two daily hydrated words | |
responses: | |
'200': | |
description: Two hydrated daily words | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WordsDaily' | |
/words/{word_id}/hydrated/: | |
get: | |
summary: Retrieves the hyrdated word data for a word ID | |
parameters: | |
- name: word_id | |
description: ID of the word we want to retrieve hyrdated info for | |
in: path | |
required: true | |
schema: | |
description: The unique identifier of a word | |
type: integer | |
responses: | |
'200': | |
description: Hyrdated word for word_id | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/HydratedWord' | |
components: | |
schemas: | |
WordsDaily: | |
type: object | |
properties: | |
fastPath: | |
type: integer | |
description: the fastest path for these two words | |
words: | |
type: array | |
description: array containing two hydrated words | |
items: | |
$ref: '#/components/schemas/HydratedWord' | |
HydratedWord: | |
type: object | |
properties: | |
id: | |
type: integer | |
format: int32 | |
description: The unique identifier for the word | |
name: | |
type: string | |
description: The name of the word | |
phonetic: | |
type: string | |
description: The phonetic representation of the word | |
asins: | |
type: array | |
description: list of AsIns connected to the root word | |
items: | |
type: object | |
properties: | |
id: | |
type: integer | |
format: int32 | |
description: The unique identifier for the ASIN | |
type: | |
type: string | |
description: The type of the ASIN | |
alias: | |
type: string | |
description: The alias of the ASIN | |
desc: | |
type: string | |
description: The description of the ASIN | |
synonyms: | |
type: array | |
description: array of synonyms connected to AsIns/Root Word | |
items: | |
type: object | |
properties: | |
id: | |
type: integer | |
format: int32 | |
description: The unique identifier for the synonym | |
relatedness: | |
type: string | |
description: The relatedness of the synonym | |
word: | |
type: object | |
properties: | |
id: | |
type: integer | |
format: int32 | |
description: The unique identifier for the related word | |
name: | |
type: string | |
description: The name of the related word |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment