mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 10:03:31 +00:00
Handle OpenAPI read-only properties (#2962)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Handle read-only in OpenAPISchemaName
|
||||||
@@ -198,7 +198,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-required {
|
.openapi-schema-required {
|
||||||
@apply text-amber-600 text-[0.813rem];
|
@apply text-warning-subtle text-[0.813rem];
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-schema-readonly {
|
||||||
|
@apply text-primary-subtle/9 text-[0.813rem];
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-type {
|
.openapi-schema-type {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export function OpenAPISchemaName(props: OpenAPISchemaNameProps) {
|
|||||||
<span className="openapi-schema-type">{additionalItems}</span>
|
<span className="openapi-schema-type">{additionalItems}</span>
|
||||||
) : null}
|
) : null}
|
||||||
</span>
|
</span>
|
||||||
|
{schema?.readOnly ? <span className="openapi-schema-readonly">read-only</span> : null}
|
||||||
{required ? <span className="openapi-schema-required">required</span> : null}
|
{required ? <span className="openapi-schema-required">required</span> : null}
|
||||||
{schema?.deprecated ? <span className="openapi-deprecated">Deprecated</span> : null}
|
{schema?.deprecated ? <span className="openapi-deprecated">Deprecated</span> : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user