Skip to content

Commit

Permalink
stash: docs v3
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Oct 10, 2024
1 parent 040ccce commit 5677bd6
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 23 deletions.
7 changes: 7 additions & 0 deletions fern/apis/fdr/definition/commons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ types:
- Deprecated
- Beta

RgbaColor:
properties:
r: integer
g: integer
b: integer
a: optional<double>

errors:
BadRequestError:
status-code: 400
Expand Down
15 changes: 4 additions & 11 deletions fern/apis/fdr/definition/docs/v1/commons/commons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ types:
fileId: rootCommons.FileId
url: rootCommons.Url

RgbaColor:
properties:
r: integer
g: integer
b: integer
a: optional<double>

# Docs layout config

ProgrammingLanguage:
Expand Down Expand Up @@ -344,7 +337,7 @@ types:
ColorsConfig:
availability: deprecated
properties:
accentPrimary: optional<RgbaColor>
accentPrimary: optional<rootCommons.RgbaColor>

ColorsConfigV2:
availability: deprecated
Expand All @@ -361,13 +354,13 @@ types:
ColorUnthemedConfig:
availability: deprecated
properties:
color: optional<RgbaColor>
color: optional<rootCommons.RgbaColor>

ColorThemedConfig:
availability: deprecated
properties:
dark: optional<RgbaColor>
light: optional<RgbaColor>
dark: optional<rootCommons.RgbaColor>
light: optional<rootCommons.RgbaColor>

DocsTypographyConfig:
availability: deprecated
Expand Down
12 changes: 6 additions & 6 deletions fern/apis/fdr/definition/docs/v1/read/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ types:
properties:
logo: optional<rootCommons.FileId>
backgroundImage: optional<rootCommons.FileId>
accentPrimary: commons.RgbaColor
accentPrimary: rootCommons.RgbaColor
background: Background
border: optional<commons.RgbaColor>
sidebarBackground: optional<commons.RgbaColor>
headerBackground: optional<commons.RgbaColor>
cardBackground: optional<commons.RgbaColor>
border: optional<rootCommons.RgbaColor>
sidebarBackground: optional<rootCommons.RgbaColor>
headerBackground: optional<rootCommons.RgbaColor>
cardBackground: optional<rootCommons.RgbaColor>

DarkAndLightModeConfig:
properties:
Expand All @@ -163,7 +163,7 @@ types:

Background:
union:
solid: commons.RgbaColor
solid: rootCommons.RgbaColor
gradient: {}

NavigationConfig:
Expand Down
12 changes: 6 additions & 6 deletions fern/apis/fdr/definition/docs/v1/write/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ types:
properties:
logo: optional<rootCommons.FileId>
backgroundImage: optional<rootCommons.FileId>
accentPrimary: commons.RgbaColor
background: optional<commons.RgbaColor>
border: optional<commons.RgbaColor>
sidebarBackground: optional<commons.RgbaColor>
headerBackground: optional<commons.RgbaColor>
cardBackground: optional<commons.RgbaColor>
accentPrimary: rootCommons.RgbaColor
background: optional<rootCommons.RgbaColor>
border: optional<rootCommons.RgbaColor>
sidebarBackground: optional<rootCommons.RgbaColor>
headerBackground: optional<rootCommons.RgbaColor>
cardBackground: optional<rootCommons.RgbaColor>

DarkAndLightModeConfig:
properties:
Expand Down
163 changes: 163 additions & 0 deletions fern/apis/fdr/definition/docs/v3/__package__.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
rootCommons: ../../commons.yml
navigation: ../../navigation/latest/__package__.yml
algolia: ../../algolia.yml
v1Commons: ../v1/commons/commons.yml

service:
base-path: /v3/registry/docs
auth: true
endpoints:
getOrganization:
method: GET
path: /{domain}/organization
path-parameters:
domain: string
response: rootCommons.OrgId
errors:
- rootCommons.UnauthorizedError
- rootCommons.NotFoundError

getNavigation:
method: GET
path: /{domain}/instance/{id}/navigation
path-parameters:
domain: string
id: DocsInstanceId
response: navigation.RootNode
errors:
- rootCommons.UnauthorizedError
- rootCommons.NotFoundError

getConfig:
method: GET
path: /{domain}/instance/{id}/config
path-parameters:
domain: string
id: DocsInstanceId
response: DocsConfig
errors:
- rootCommons.UnauthorizedError
- rootCommons.NotFoundError

getPages:
method: POST
path: /{domain}/instance/{id}/pages
path-parameters:
domain: string
id: DocsInstanceId
request:
name: BulkGetPagesRequest
body:
properties:
pages: list<rootCommons.PageId>
response: map<rootCommons.PageId, DocsPage>
errors:
- rootCommons.UnauthorizedError
- rootCommons.NotFoundError

getFiles:
method: POST
path: /{domain}/instance/{id}/files
path-parameters:
domain: string
id: DocsInstanceId
request:
name: BulkGetFilesRequest
body:
properties:
files: list<rootCommons.FileId>
response: map<rootCommons.FileId, FileMetadata>
errors:
- rootCommons.UnauthorizedError
- rootCommons.NotFoundError

types:
DocsInstanceId:
discriminated: false
union:
- rootCommons.DocsConfigId
- literal<"latest">

FileMetadata:
union:
url: UrlFile
image: ImageFile

UrlFile:
properties:
url: rootCommons.Url

ImageFile:
properties:
url: rootCommons.Url
width: double
height: double
blurDataUrl: optional<string>
alt: optional<string>

DocsConfig:
properties:
id: rootCommons.DocsConfigId
updatedAt: timestamp

title: optional<string>
defaultLanguage: optional<v1Commons.ProgrammingLanguage>
announcement: optional<v1Commons.AnnouncementConfig>

# navigation
navbarLinks: optional<list<v1Commons.NavbarLink>>
footerLinks: optional<list<v1Commons.FooterLink>>

# logo
logoHeight: optional<Height>
logoHref: optional<rootCommons.Url>
favicon: optional<rootCommons.FileId>

# seo
metadata: optional<v1Commons.MetadataConfig>
redirects: optional<list<v1Commons.RedirectConfig>>

# styles
colors: optional<ColorsConfig>
fonts: optional<v1Commons.DocsTypographyConfigV2>
layout: optional<v1Commons.DocsLayoutConfig>

# integrations
analytics: optional<v1Commons.AnalyticsConfig>
integrations: optional<v1Commons.IntegrationsConfig>
search: optional<algolia.SingleAlgoliaIndexInfo>

# css and js
css: optional<v1Commons.CssConfig>
js: optional<v1Commons.JsConfig>

# playground
playground: optional<v1Commons.PlaygroundConfig>

# files
files: optional<list<rootCommons.FileId>>
markdownPageIds: optional<list<rootCommons.PageId>>
mdxBundlerFileIds: optional<list<rootCommons.PageId>>

ColorsConfig:
properties:
dark: optional<ThemeConfig>
light: optional<ThemeConfig>

ThemeConfig:
properties:
logo: optional<rootCommons.FileId>
backgroundImage: optional<rootCommons.FileId>
accentPrimary: rootCommons.RgbaColor
background: Background
border: optional<rootCommons.RgbaColor>
sidebarBackground: optional<rootCommons.RgbaColor>
headerBackground: optional<rootCommons.RgbaColor>
cardBackground: optional<rootCommons.RgbaColor>

GetSearchKeyResponse:
properties:
key: string

0 comments on commit 5677bd6

Please sign in to comment.