1
0
mirror of synced 2025-12-30 12:02:01 -05:00
Files
docs/components/rest/types.ts
Grace Park 1a6bee4601 Refactor to add RestReferencePage (#25781)
* refactor to add RestReferencePage

* remove structured data from article page

* add back clientsidehightlight js and remove structuredcontent

* update endpoint available for github apps page to use RestReferencePage

* check for minitocs

* use children for ArticlePage for overview endpoints page and move category data to RestReferencePage

* create MiniTocs component

* add MiniTocs

* fix unique key issue

* break into out into own div

* remove some unnecessary ts

* refactor looping section

* simplify markdown component usage

* add key prop

* add key prop

* add unique key

Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-03-08 18:00:38 +00:00

76 lines
1.3 KiB
TypeScript

export interface Operation {
verb: string
summary: string
slug: string
descriptionHTML: string
notes: Array<string>
requestPath: string
responses: Array<CodeResponse>
hasRequiredPreviews: boolean
parameters: Array<Parameter>
bodyParameters: Array<BodyParameter>
'x-github': xGitHub
'x-codeSamples': Array<xCodeSample>
}
export interface Parameter {
in: string
name: string
descriptionHTML: string
required: boolean
schema: {
type: string
default?: string
}
}
export interface xGitHub {
category: string
enabledForGitHubApps: boolean
previews: Array<Preview> | []
}
export interface CodeResponse {
description: string
httpStatusCode: string
httpStatusMessage: string
payload: string
}
export interface xCodeSample {
lang: string
source: string
}
export interface Preview {
html: string
required: boolean
name: string
}
export interface BodyParameter {
in: string
name: string
childParamsGroups?: Array<ChildParamsGroup>
default?: string
description: string
type: string
}
export interface ChildParamsGroup {
id: string
params: Array<ChildParameter>
parentName: string
parentType: string
}
export interface ChildParameter {
name: string
description: string
type: string
}
export interface RestCategoryOperationsT {
[subcategory: string]: Operation[]
}