Extensions reference
The complete reference of OpenAPI extensions supported by GitBook
You can enhance your OpenAPI specification using extensions—custom fields that start with the x- prefix. These extensions let you add extra information and tailor your API documentation to suit different needs.
GitBook allows you to adjust how your API looks and works on your published site through a range of different extensions you can add to your OpenAPI spec.
Head to our guides section to learn more about using OpenAPI extensions to configure your documentation.
x-page-title | x-displayName
Change the display name of a tag used in the navigation and page title.
openapi: '3.0'
info: ...
tags:
- name: users
x-page-title: Usersx-page-description
Add a description to the page.
openapi: '3.0'
info: ...
tags:
- name: "users"
x-page-title: "Users"
x-page-description: "Manage user accounts and profiles."x-page-icon
Add a Font Awesome icon to the page. See available icons here.
openapi: '3.0'
info: ...
tags:
- name: "users"
x-page-title: "Users"
x-page-description: "Manage user accounts and profiles."
x-page-icon: "user"parent | x-parent
Add hierarchy to tags to organize your pages in GitBook.
parent is the official property name in OpenAPI 3.2+. If using OpenAPI versions prior to 3.2 (3.0.x, 3.1.x), use x-parent instead.
openapi: '3.2'
info: ...
tags:
- name: organization
- name: admin
parent: organization
- name: user
parent: organization x-hideTryItPanel
Show or hide the “Test it” button for an OpenAPI block.
openapi: '3.0'
info: ...
tags: [...]
paths:
/example:
get:
summary: Example summary
description: Example description
operationId: examplePath
responses: [...]
parameters: [...]
x-hideTryItPanel: truex-codeSamples
Show, hide, or include custom code samples for an OpenAPI block.
Fields
label
string
Code sample label, for example Node or Python2.7, optional, lang is used by default
source
string
Code sample source code
x-stability
Mark endpoints that are unstable or in progress.
Supported values: experimental, alpha, beta.
Last updated
Was this helpful?