Skip to content

Commit

Permalink
fix: parse JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgenii Fedoseev authored and moki committed Dec 21, 2022
1 parent 55cf26d commit edf0e74
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@doc-tools/yfm2xliff": "0.0.3",
"@octokit/core": "3.5.1",
"@types/glob": "^8.0.0",
"@types/json-stringify-safe": "^5.0.0",
"@yandex-cloud/nodejs-sdk": "^2.2.2",
"ajv": "^8.11.0",
"async": "^3.2.4",
Expand All @@ -44,6 +45,7 @@
"glob": "^8.0.3",
"highlight.js": "10.7.3",
"js-yaml": "4.1.0",
"json-stringify-safe": "^5.0.1",
"mime-types": "2.1.34",
"node-html-parser": "^5.3.3",
"react": "16.14.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import stringify from 'json-stringify-safe';

import {block, title, body, table, code, cut} from './common';
import {
DESCRIPTION_SECTION_NAME,
Expand Down Expand Up @@ -67,7 +69,7 @@ function response(resp: Response) {

/* eslint-disable-next-line no-shadow */
function schema({type, schema}: Schema) {
return cut(code(JSON.stringify(schema, null, 4)), type);
return cut(code(stringify(schema, null, 4)), type);
}

export {endpoint};
Expand Down

0 comments on commit edf0e74

Please sign in to comment.