Add OpenAPI write-only indicator (#3059)

This commit is contained in:
Nolann B.
2025-03-27 18:21:38 +01:00
committed by GitHub
parent 0d9b9cea0f
commit 61db166f92
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@gitbook/react-openapi': patch
'gitbook': patch
---
Add OpenAPI write-only indicator
@@ -209,6 +209,10 @@
@apply text-primary-subtle/9 text-[0.813rem];
}
.openapi-schema-writeonly {
@apply text-success dark:text-success-subtle/9 text-[0.813rem];
}
.openapi-schema-type {
@apply text-tint select-text text-[0.813rem] font-mono [word-spacing:-0.25rem];
}
@@ -32,6 +32,9 @@ export function OpenAPISchemaName(props: OpenAPISchemaNameProps) {
) : null}
</span>
{schema?.readOnly ? <span className="openapi-schema-readonly">read-only</span> : null}
{schema?.writeOnly ? (
<span className="openapi-schema-writeonly">write-only</span>
) : null}
{required ? (
<span className="openapi-schema-required">required</span>
) : (