File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
gitbook/src/components/DocumentView/OpenAPI Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @gitbook/react-openapi " : patch
3+ " gitbook " : patch
4+ ---
5+
6+ Mark properties as optional if not required
Original file line number Diff line number Diff line change 201201 @apply text-warning-subtle text-[0.813rem ];
202202}
203203
204+ .openapi-schema-optional {
205+ @apply text-info-subtle text-[0.813rem ];
206+ }
207+
204208.openapi-schema-readonly {
205209 @apply text-primary-subtle/9 text-[0.813rem ];
206210}
Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ export function OpenAPISchemaName(props: OpenAPISchemaNameProps) {
3232 ) : null }
3333 </ span >
3434 { schema ?. readOnly ? < span className = "openapi-schema-readonly" > read-only</ span > : null }
35- { required ? < span className = "openapi-schema-required" > required</ span > : null }
35+ { required ? (
36+ < span className = "openapi-schema-required" > required</ span >
37+ ) : (
38+ < span className = "openapi-schema-optional" > optional</ span >
39+ ) }
3640 { schema ?. deprecated ? < span className = "openapi-deprecated" > Deprecated</ span > : null }
3741 </ div >
3842 ) ;
You can’t perform that action at this time.
0 commit comments