Skip to content

Commit 671fbdb

Browse files
committed
Remove OpenAPIModelsSchema + align to main
1 parent 339e487 commit 671fbdb

File tree

3 files changed

+12
-105
lines changed

3 files changed

+12
-105
lines changed

packages/gitbook/src/components/DocumentView/OpenAPI/style.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
@apply py-2.5 flex flex-col gap-2;
143143
}
144144

145-
.openapi-section-body .openapi-schema-properties {
145+
.openapi-section .openapi-schema-properties {
146146
@apply divide-y divide-tint-subtle;
147147
}
148148

@@ -620,14 +620,10 @@
620620
@apply space-y-2.5;
621621
}
622622

623-
.openapi-models-properties {
623+
.openapi-section-models {
624624
@apply border border-tint-subtle rounded-lg;
625625
}
626626

627-
.openapi-models-properties .openapi-schema-properties > .openapi-schema {
627+
.openapi-section-models > .openapi-section-body > .openapi-schema-properties > .openapi-schema {
628628
@apply p-2.5;
629-
}
630-
631-
.openapi-models .openapi-disclosure-group-panel > .openapi-section {
632-
@apply py-0;
633629
}

packages/react-openapi/src/models/OpenAPIModelSchema.tsx

Lines changed: 0 additions & 96 deletions
This file was deleted.

packages/react-openapi/src/models/OpenAPIModels.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import clsx from 'clsx';
22

33
import { OpenAPIDisclosureGroup } from '../OpenAPIDisclosureGroup';
4+
import { OpenAPIRootSchema } from '../OpenAPISchema';
5+
import { Section, SectionBody } from '../StaticSection';
46
import type { OpenAPIClientContext, OpenAPIContextProps, OpenAPIModelsData } from '../types';
5-
import { OpenAPIModelSchema } from './OpenAPIModelSchema';
67

78
/**
89
* Display OpenAPI Models.
@@ -34,7 +35,13 @@ export function OpenAPIModels(props: {
3435
<span className="openapi-response-statuscode">{name}</span>
3536
</div>
3637
),
37-
body: <OpenAPIModelSchema schema={schema} context={clientContext} />,
38+
body: (
39+
<Section className="openapi-section-models">
40+
<SectionBody>
41+
<OpenAPIRootSchema schema={schema} context={clientContext} />
42+
</SectionBody>
43+
</Section>
44+
),
3845
}))}
3946
/>
4047
) : null}

0 commit comments

Comments
 (0)