mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-17 16:15:22 +00:00
85ec1884e6
* Start methods to resolve refs * bun * Start package * Add code to resolve ref * Continue * Deref * Start monorepo * Continue * Fix ref resolver * Style a bit more * Start toggling section * Continue * Start displaying query/path/headers params * Hide respo se if empty * Fix recursive refs * Simplify interactive and styling * Display enums * Format * Improve type name being displayed * Improve naming * Render oneOf/anyOf/allOf * Handle circular references * Start variable in server url * Use client component for the spec part * Improve CSS sizing * Display open api blocks in aside * Make aside an overlay * Improve stickiness of openapi * Align document on the left when api page * Improve general layout * Better align * Fix padding in aside * Use syntax highlighting * Show sample of response * Improve code generation * Improve code generated * Format * Format * Rename to OpenAPI * Skip deprecated properties and handle additionalProperties * Use discriminator for naming * Better name enum * Make entire header toggeable * Format and lint * Add curl example * Improve curl * style pass * Start securities * Bun * Fix TS * Improve label * Start markdown * Improve code samples * Test * Use custom skeleton for api block * Format * Add support for redocly code samples * Fix api blocks in aside * Use typography for markdown * Format * Fix spacing in markdown * Render headers * Format * Format --------- Co-authored-by: Sebastian Graz <graz@live.se>
17 lines
462 B
TypeScript
17 lines
462 B
TypeScript
'use client';
|
|
|
|
import classNames from 'classnames';
|
|
import { OpenAPIV3 } from 'openapi-types';
|
|
import React from 'react';
|
|
|
|
/**
|
|
* Interactive component to show the value of a server variable and let the user change it.
|
|
*/
|
|
export function OpenAPIServerURLVariable(props: {
|
|
name: string;
|
|
variable: OpenAPIV3.ServerVariableObject;
|
|
}) {
|
|
const { variable } = props;
|
|
return <span className={classNames('openapi-url-var')}>{variable.default}</span>;
|
|
}
|