-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
231 additions
and
2,302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json", | ||
"files": { | ||
"ignore": ["examples/**/*.*"] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "tab", | ||
"lineWidth": 240 | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,34 @@ | ||
{ | ||
"name": "mock-to-openapi", | ||
"version": "1.1.2", | ||
"description": "Cli tool (and library) for converting JSON mock objects to Open API schemas", | ||
"type": "module", | ||
"exports": "./src/index.js", | ||
"license": "MIT", | ||
"repository": "OzzyCzech/mock-to-openapi", | ||
"author": "Roman Ožana <[email protected]> (https://ozana.cz)", | ||
"bin": { | ||
"mock-to-openapi": "cli.js" | ||
}, | ||
"keywords": [ | ||
"openapi", | ||
"converter", | ||
"swagger", | ||
"yaml", | ||
"json", | ||
"cli" | ||
], | ||
"scripts": { | ||
"test": "xo && ava", | ||
"release": "np --no-release-draft", | ||
"examples": "./cli.js ./examples" | ||
}, | ||
"private": false, | ||
"dependencies": { | ||
"chalk": "^5.3.0", | ||
"globby": "^14.0.2", | ||
"luxon": "^3.5.0", | ||
"meow": "^13.2.0", | ||
"yaml": "^2.6.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "^6.2.0", | ||
"np": "^10.1.0", | ||
"xo": "^0.60.0" | ||
}, | ||
"xo": { | ||
"rules": { | ||
"no-await-in-loop": 0 | ||
} | ||
} | ||
"name": "mock-to-openapi", | ||
"version": "1.1.2", | ||
"description": "Cli tool (and library) for converting JSON mock objects to Open API schemas", | ||
"type": "module", | ||
"exports": "./src/index.js", | ||
"license": "MIT", | ||
"repository": "OzzyCzech/mock-to-openapi", | ||
"author": "Roman Ožana <[email protected]> (https://ozana.cz)", | ||
"bin": { | ||
"mock-to-openapi": "cli.js" | ||
}, | ||
"keywords": ["openapi", "converter", "swagger", "yaml", "json", "cli"], | ||
"scripts": { | ||
"test": "ava", | ||
"format": "biome format --write", | ||
"lint": "biome lint", | ||
"release": "np --no-release-draft", | ||
"examples": "./cli.js ./examples" | ||
}, | ||
"private": false, | ||
"dependencies": { | ||
"@biomejs/biome": "^1.9.4", | ||
"chalk": "^5.3.0", | ||
"globby": "^14.0.2", | ||
"luxon": "^3.5.0", | ||
"meow": "^13.2.0", | ||
"yaml": "^2.6.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "^6.2.0", | ||
"np": "^10.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export {toOpenApi} from './to-open-api.js'; | ||
export {readJson} from './read-json.js'; | ||
export {writeYaml} from './write-yaml.js'; | ||
export { toOpenApi } from "./to-open-api.js"; | ||
export { readJson } from "./read-json.js"; | ||
export { writeYaml } from "./write-yaml.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import {readFile as readFileAsync} from 'node:fs/promises'; | ||
import { readFile as readFileAsync } from "node:fs/promises"; | ||
|
||
/** | ||
* Read file content as string | ||
* @param {string} path | ||
* @returns {Promise<*>} | ||
*/ | ||
export async function readJson(path) { | ||
return JSON.parse(await readFileAsync(path, 'utf8')); | ||
return JSON.parse(await readFileAsync(path, "utf8")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.