@backstage/plugin-api-docs 0.9.4-next.1 → 0.9.4
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.
- package/CHANGELOG.md +2 -20
- package/dist/esm/{OpenApiDefinition-31f0d6c2.esm.js → OpenApiDefinition-c7d6b074.esm.js} +2 -2
- package/dist/esm/OpenApiDefinition-c7d6b074.esm.js.map +1 -0
- package/dist/esm/{index-c169a6bb.esm.js → index-2d3e0149.esm.js} +1 -1
- package/dist/esm/index-2d3e0149.esm.js.map +1 -0
- package/dist/esm/{index-e0eb12ef.esm.js → index-445cebb2.esm.js} +1 -1
- package/dist/esm/index-445cebb2.esm.js.map +1 -0
- package/dist/esm/{index-47edd08c.esm.js → index-c8b752cc.esm.js} +1 -1
- package/dist/esm/index-c8b752cc.esm.js.map +1 -0
- package/dist/esm/{index-667b5b85.esm.js → index-eebaaadb.esm.js} +1 -1
- package/dist/esm/index-eebaaadb.esm.js.map +1 -0
- package/dist/index.esm.js +8 -8
- package/package.json +11 -11
- package/dist/esm/OpenApiDefinition-31f0d6c2.esm.js.map +0 -1
- package/dist/esm/index-47edd08c.esm.js.map +0 -1
- package/dist/esm/index-667b5b85.esm.js.map +0 -1
- package/dist/esm/index-c169a6bb.esm.js.map +0 -1
- package/dist/esm/index-e0eb12ef.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
# @backstage/plugin-api-docs
|
|
2
2
|
|
|
3
|
-
## 0.9.4
|
|
3
|
+
## 0.9.4
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- 83bdc3a555c1: Replaced usages of `theme.palette.theme.hint` with `theme.palette.text.secondary` as it has been removed in MUI v5
|
|
8
7
|
- Updated dependencies
|
|
9
|
-
- @backstage/plugin-catalog@1.11.1
|
|
10
|
-
- @backstage/core-components@0.13.2-next.1
|
|
11
|
-
- @backstage/plugin-catalog-react@1.7.0-next.1
|
|
12
|
-
- @backstage/catalog-model@1.4.0-next.0
|
|
13
|
-
- @backstage/core-plugin-api@1.5.2-next.0
|
|
14
|
-
- @backstage/theme@0.4.0-next.0
|
|
15
|
-
|
|
16
|
-
## 0.9.4-next.0
|
|
17
|
-
|
|
18
|
-
### Patch Changes
|
|
19
|
-
|
|
20
|
-
- Updated dependencies
|
|
21
|
-
- @backstage/plugin-catalog-react@1.7.0-next.0
|
|
22
|
-
- @backstage/theme@0.4.0-next.0
|
|
23
|
-
- @backstage/plugin-catalog@1.11.1-next.0
|
|
24
|
-
- @backstage/core-components@0.13.2-next.0
|
|
25
|
-
- @backstage/core-plugin-api@1.5.1
|
|
26
|
-
- @backstage/catalog-model@1.3.0
|
|
8
|
+
- @backstage/plugin-catalog@1.11.1
|
|
27
9
|
|
|
28
10
|
## 0.9.3
|
|
29
11
|
|
|
@@ -88,7 +88,7 @@ const useStyles = makeStyles((theme) => ({
|
|
|
88
88
|
fontWeight: theme.typography.fontWeightRegular
|
|
89
89
|
},
|
|
90
90
|
[`& .model-hint`]: {
|
|
91
|
-
color: theme.palette.text.
|
|
91
|
+
color: theme.palette.text.hint,
|
|
92
92
|
backgroundColor: theme.palette.background.paper
|
|
93
93
|
},
|
|
94
94
|
[`& .opblock-summary-method,
|
|
@@ -127,4 +127,4 @@ const OpenApiDefinition = ({ definition }) => {
|
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
export { OpenApiDefinition };
|
|
130
|
-
//# sourceMappingURL=OpenApiDefinition-
|
|
130
|
+
//# sourceMappingURL=OpenApiDefinition-c7d6b074.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenApiDefinition-c7d6b074.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n ['& .btn-clear']: {\n color: theme.palette.text.primary,\n },\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-description-wrapper,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header,\n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model,\n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model,\n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.hint,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method,\n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n};\n\nexport const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI spec={def} url=\"\" deepLinking />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,eAAiB,EAAA;AAAA,MACf,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,MAC7B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,MAE1B,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,0BAA0B,GAAG;AAAA,QAC5B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,SAAU,CAAA,KAAA;AAAA,OACjC;AAAA,MACA,CAAC,gCAAgC,GAAG;AAAA,QAClC,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,OAC5B;AAAA,MACA,CAAC,kBAAkB,GAAG;AAAA,QACpB,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,OAAQ,CAAA,KAAA;AAAA,OAC/B;AAAA,KACF;AAAA,GACF;AACF,CAAE,CAAA,CAAA,CAAA;AAMK,MAAM,iBAAoB,GAAA,CAAC,EAAE,UAAA,EAAyC,KAAA;AAC3E,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAI1B,EAAA,MAAM,CAAC,GAAA,EAAK,MAAM,CAAA,GAAI,SAAS,EAAE,CAAA,CAAA;AAEjC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,QAAQ,UAAW,CAAA,MAAM,MAAO,CAAA,UAAU,GAAG,CAAC,CAAA,CAAA;AACpD,IAAO,OAAA,MAAM,aAAa,KAAK,CAAA,CAAA;AAAA,GAC9B,EAAA,CAAC,UAAY,EAAA,MAAM,CAAC,CAAA,CAAA;AAEvB,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,IACtB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAU,EAAA,EAAA,IAAA,EAAM,GAAK,EAAA,GAAA,EAAI,EAAG,EAAA,WAAA,EAAW,MAAC,CAC3C,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-2d3e0149.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-445cebb2.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-c8b752cc.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-eebaaadb.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -135,7 +135,7 @@ const GraphQlDefinitionWidget = (props) => {
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
const LazyOpenApiDefinition = React.lazy(
|
|
138
|
-
() => import('./esm/OpenApiDefinition-
|
|
138
|
+
() => import('./esm/OpenApiDefinition-c7d6b074.esm.js').then((m) => ({
|
|
139
139
|
default: m.OpenApiDefinition
|
|
140
140
|
}))
|
|
141
141
|
);
|
|
@@ -534,7 +534,7 @@ const apiDocsPlugin = createPlugin({
|
|
|
534
534
|
const ApiExplorerPage = apiDocsPlugin.provide(
|
|
535
535
|
createRoutableExtension({
|
|
536
536
|
name: "ApiExplorerPage",
|
|
537
|
-
component: () => import('./esm/index-
|
|
537
|
+
component: () => import('./esm/index-445cebb2.esm.js').then((m) => m.ApiExplorerIndexPage),
|
|
538
538
|
mountPoint: rootRoute
|
|
539
539
|
})
|
|
540
540
|
);
|
|
@@ -542,7 +542,7 @@ const EntityApiDefinitionCard = apiDocsPlugin.provide(
|
|
|
542
542
|
createComponentExtension({
|
|
543
543
|
name: "EntityApiDefinitionCard",
|
|
544
544
|
component: {
|
|
545
|
-
lazy: () => import('./esm/index-
|
|
545
|
+
lazy: () => import('./esm/index-eebaaadb.esm.js').then((m) => m.ApiDefinitionCard)
|
|
546
546
|
}
|
|
547
547
|
})
|
|
548
548
|
);
|
|
@@ -550,7 +550,7 @@ const EntityConsumedApisCard = apiDocsPlugin.provide(
|
|
|
550
550
|
createComponentExtension({
|
|
551
551
|
name: "EntityConsumedApisCard",
|
|
552
552
|
component: {
|
|
553
|
-
lazy: () => import('./esm/index-
|
|
553
|
+
lazy: () => import('./esm/index-2d3e0149.esm.js').then((m) => m.ConsumedApisCard)
|
|
554
554
|
}
|
|
555
555
|
})
|
|
556
556
|
);
|
|
@@ -558,7 +558,7 @@ const EntityConsumingComponentsCard = apiDocsPlugin.provide(
|
|
|
558
558
|
createComponentExtension({
|
|
559
559
|
name: "EntityConsumingComponentsCard",
|
|
560
560
|
component: {
|
|
561
|
-
lazy: () => import('./esm/index-
|
|
561
|
+
lazy: () => import('./esm/index-c8b752cc.esm.js').then(
|
|
562
562
|
(m) => m.ConsumingComponentsCard
|
|
563
563
|
)
|
|
564
564
|
}
|
|
@@ -568,7 +568,7 @@ const EntityProvidedApisCard = apiDocsPlugin.provide(
|
|
|
568
568
|
createComponentExtension({
|
|
569
569
|
name: "EntityProvidedApisCard",
|
|
570
570
|
component: {
|
|
571
|
-
lazy: () => import('./esm/index-
|
|
571
|
+
lazy: () => import('./esm/index-2d3e0149.esm.js').then((m) => m.ProvidedApisCard)
|
|
572
572
|
}
|
|
573
573
|
})
|
|
574
574
|
);
|
|
@@ -576,7 +576,7 @@ const EntityProvidingComponentsCard = apiDocsPlugin.provide(
|
|
|
576
576
|
createComponentExtension({
|
|
577
577
|
name: "EntityProvidingComponentsCard",
|
|
578
578
|
component: {
|
|
579
|
-
lazy: () => import('./esm/index-
|
|
579
|
+
lazy: () => import('./esm/index-c8b752cc.esm.js').then(
|
|
580
580
|
(m) => m.ProvidingComponentsCard
|
|
581
581
|
)
|
|
582
582
|
}
|
|
@@ -586,7 +586,7 @@ const EntityHasApisCard = apiDocsPlugin.provide(
|
|
|
586
586
|
createComponentExtension({
|
|
587
587
|
name: "EntityHasApisCard",
|
|
588
588
|
component: {
|
|
589
|
-
lazy: () => import('./esm/index-
|
|
589
|
+
lazy: () => import('./esm/index-2d3e0149.esm.js').then((m) => m.HasApisCard)
|
|
590
590
|
}
|
|
591
591
|
})
|
|
592
592
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-api-docs",
|
|
3
3
|
"description": "A Backstage plugin that helps represent API entities in the frontend",
|
|
4
|
-
"version": "0.9.4
|
|
4
|
+
"version": "0.9.4",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@asyncapi/react-component": "1.0.0-next.47",
|
|
36
|
-
"@backstage/catalog-model": "^1.
|
|
37
|
-
"@backstage/core-components": "^0.13.
|
|
38
|
-
"@backstage/core-plugin-api": "^1.5.
|
|
39
|
-
"@backstage/plugin-catalog": "^1.11.1
|
|
40
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
41
|
-
"@backstage/theme": "^0.
|
|
36
|
+
"@backstage/catalog-model": "^1.3.0",
|
|
37
|
+
"@backstage/core-components": "^0.13.1",
|
|
38
|
+
"@backstage/core-plugin-api": "^1.5.1",
|
|
39
|
+
"@backstage/plugin-catalog": "^1.11.1",
|
|
40
|
+
"@backstage/plugin-catalog-react": "^1.6.0",
|
|
41
|
+
"@backstage/theme": "^0.3.0",
|
|
42
42
|
"@material-ui/core": "^4.12.2",
|
|
43
43
|
"@material-ui/icons": "^4.9.1",
|
|
44
44
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@backstage/cli": "^0.22.
|
|
60
|
-
"@backstage/core-app-api": "^1.8.
|
|
61
|
-
"@backstage/dev-utils": "^1.0.
|
|
62
|
-
"@backstage/test-utils": "^1.
|
|
59
|
+
"@backstage/cli": "^0.22.7",
|
|
60
|
+
"@backstage/core-app-api": "^1.8.0",
|
|
61
|
+
"@backstage/dev-utils": "^1.0.15",
|
|
62
|
+
"@backstage/test-utils": "^1.3.1",
|
|
63
63
|
"@testing-library/dom": "^8.0.0",
|
|
64
64
|
"@testing-library/jest-dom": "^5.10.1",
|
|
65
65
|
"@testing-library/react": "^12.1.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiDefinition-31f0d6c2.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n ['& .btn-clear']: {\n color: theme.palette.text.primary,\n },\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-description-wrapper,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header,\n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model,\n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model,\n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.secondary,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method,\n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n};\n\nexport const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI spec={def} url=\"\" deepLinking />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,eAAiB,EAAA;AAAA,MACf,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,MAC7B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,MAE1B,CAAC,cAAc,GAAG;AAAA,QAChB,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,OAC5B;AAAA,MACA,CAAC,qBAAqB,GAAG;AAAA,QACvB,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,UAAW,CAAA,OAAA;AAAA,OAC5C;AAAA,MACA,CAAC,CAAA;AAAA;AAAA;AAAA,2BAAA,CAGqB,GAAG;AAAA,QACvB,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,QAC7B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,QAC1B,WAAA,EAAa,MAAM,OAAQ,CAAA,OAAA;AAAA,OAC7B;AAAA,MACA,CAAC,CAAA;AAAA,mCAAA,CAC6B,GAAG;AAAA,QAC/B,WAAA,EAAa,MAAM,OAAQ,CAAA,OAAA;AAAA,OAC7B;AAAA,MACA,CAAC,CAAA;AAAA;AAAA,6BAAA,CAEuB,GAAG;AAAA,QACzB,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,QAC7B,UAAA,EAAY,MAAM,UAAW,CAAA,iBAAA;AAAA,OAC/B;AAAA,MACA,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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,EAAI,SAAW,EAAA,OAAA,CAAQ,IACtB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAU,EAAA,EAAA,IAAA,EAAM,GAAK,EAAA,GAAA,EAAI,EAAG,EAAA,WAAA,EAAW,MAAC,CAC3C,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-47edd08c.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-667b5b85.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-c169a6bb.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-e0eb12ef.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|