mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Display pattern if available in OpenAPI params (#2461)
Co-authored-by: Samy Pessé <samypesse@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Display pattern if available in parmas in OpenAPI block
|
||||||
@@ -174,7 +174,8 @@
|
|||||||
@apply prose-sm;
|
@apply prose-sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-example {
|
.openapi-schema-example,
|
||||||
|
.openapi-schema-pattern {
|
||||||
@apply prose-sm mt-2 text-dark/10 dark:text-light/10;
|
@apply prose-sm mt-2 text-dark/10 dark:text-light/10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,11 @@ export function OpenAPISchemaProperty(
|
|||||||
Example: <code>{JSON.stringify(schema.example)}</code>
|
Example: <code>{JSON.stringify(schema.example)}</code>
|
||||||
</span>
|
</span>
|
||||||
) : null}
|
) : null}
|
||||||
|
{schema.pattern ? (
|
||||||
|
<div className="openapi-schema-pattern">
|
||||||
|
Pattern: <code>{schema.pattern}</code>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user