File tree 3 files changed +15
-1
lines changed
gitbook/src/components/DocumentView/OpenAPI
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 201
201
@apply text-warning-subtle text-[0.813rem ];
202
202
}
203
203
204
+ .openapi-schema-optional {
205
+ @apply text-info-subtle text-[0.813rem ];
206
+ }
207
+
204
208
.openapi-schema-readonly {
205
209
@apply text-primary-subtle/9 text-[0.813rem ];
206
210
}
Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ export function OpenAPISchemaName(props: OpenAPISchemaNameProps) {
32
32
) : null }
33
33
</ span >
34
34
{ 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
+ ) }
36
40
{ schema ?. deprecated ? < span className = "openapi-deprecated" > Deprecated</ span > : null }
37
41
</ div >
38
42
) ;
You can’t perform that action at this time.
0 commit comments