Skip to content

Commit

Permalink
fix type failure when passing schema
Browse files Browse the repository at this point in the history
  • Loading branch information
AceTheCreator committed May 29, 2024
1 parent 3cb53ec commit 6e2d4a1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion components/docs/Visualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ import React from 'react'
import Schyma from 'schyma';
import 'schyma/dist/esm/style.css'
import schema from '../../config/3.0.0.json';
import { JSONSchema7Object } from 'json-schema';

const typeSchema = schema as unknown as JSONSchema7Object


function Visualizer() {
return (
<Schyma title="AsyncAPI Specification" description="The AsyncAPI Specification defines a set of fields that can be used in an AsyncAPI document to describe an application's API. The document may reference other files for additional details or shared fields, but it is typically a single, primary document that encapsulates the API description." schema={schema} />
<Schyma title="AsyncAPI Specification" description="The AsyncAPI Specification defines a set of fields that can be used in an AsyncAPI document to describe an application's API. The document may reference other files for additional details or shared fields, but it is typically a single, primary document that encapsulates the API description." schema={typeSchema} />
)
}

Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"i18next": "^23.8.2",
"jgexml": "^0.4.4",
"js-cookie": "^3.0.5",
"json-schema": "^0.4.0",
"lodash": "^4.17.21",
"markdown-to-txt": "^2.0.1",
"markdown-toc": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "types/**/*.d.ts", "**/*.json"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "types/**/*.d.ts", "**/*.json", "config/3.0.0.ts"],
"exclude": ["node_modules", "netlify"]
}

0 comments on commit 6e2d4a1

Please sign in to comment.