@alauda/doom 0.15.10 → 0.15.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,10 +45,10 @@ export const OpenAPIResponses = ({ responses, openapi, }) => {
45
45
  if (type === 'object' &&
46
46
  'properties' in schema &&
47
47
  schema.properties) {
48
- extraNode = (_jsxs("div", { className: "my-4", children: ["Properties:", _jsx(OpenAPIProperties, { properties: schema.properties, openapi: openapi })] }));
48
+ extraNode = (_jsxs("div", { className: "my-4", children: [_jsx("em", { children: "Properties:" }), _jsx(OpenAPIProperties, { properties: schema.properties, openapi: openapi })] }));
49
49
  }
50
50
  else if (type === 'array' && 'items' in schema && schema.items) {
51
- extraNode = (_jsxs("div", { className: "my-4", children: ["Items:", _jsx(OpenAPIProperty, { property: schema.items, openapi: openapi })] }));
51
+ extraNode = (_jsxs("div", { className: "my-4", children: [_jsx("em", { children: "Items:" }), _jsx(OpenAPIProperty, { property: schema.items, openapi: openapi })] }));
52
52
  }
53
53
  }
54
54
  else if (type && '$ref' in type) {
@@ -11,6 +11,7 @@ export const OpenAPIProperty = ({ name, property, openapi, }) => {
11
11
  const propObj = '$ref' in property ? resolveRef(openapi, property.$ref) : property;
12
12
  const type = propObj.type;
13
13
  let typeNode;
14
+ let extraNode;
14
15
  if (type === 'array') {
15
16
  const { items } = propObj;
16
17
  const itemsObj = '$ref' in items ? resolveRef(openapi, items.$ref) : items;
@@ -18,6 +19,9 @@ export const OpenAPIProperty = ({ name, property, openapi, }) => {
18
19
  typeNode = (_jsxs("code", { children: ["[]", '$ref' in items ? _jsx(RefLink, { "$ref": items.$ref }) : itemsType] }));
19
20
  }
20
21
  else if (type === 'object') {
22
+ if ('properties' in property && property.properties) {
23
+ extraNode = (_jsxs("div", { className: "my-4", children: [_jsx("em", { children: "Properties:" }), _jsx(OpenAPIProperties, { properties: property.properties, openapi: openapi })] }));
24
+ }
21
25
  if (typeof propObj.additionalProperties === 'object') {
22
26
  const props = propObj.additionalProperties;
23
27
  const propsObj = '$ref' in props ? resolveRef(openapi, props.$ref) : props;
@@ -36,7 +40,7 @@ export const OpenAPIProperty = ({ name, property, openapi, }) => {
36
40
  else if ('$ref' in property) {
37
41
  typeNode = _jsx(RefLink, { "$ref": property.$ref });
38
42
  }
39
- return (_jsxs(_Fragment, { children: [name && (_jsxs(_Fragment, { children: [_jsx("code", { children: name }), ":", ' '] })), typeNode, _jsx(Markdown, { children: propObj.description })] }));
43
+ return (_jsxs(_Fragment, { children: [name && (_jsxs(_Fragment, { children: [_jsx("code", { children: name }), ":", ' '] })), typeNode, _jsx(Markdown, { children: propObj.description }), extraNode] }));
40
44
  };
41
45
  export const OpenAPIProperties = ({ properties, openapi, }) => {
42
46
  const [X] = useState(getCustomMDXComponent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.15.10",
3
+ "version": "0.15.11",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": {