{"id":23040043,"url":"https://github.com/fastcodejava/schematodoc","last_synced_at":"2025-06-11T12:36:32.874Z","repository":{"id":65493386,"uuid":"69760076","full_name":"fastcodejava/schematodoc","owner":"fastcodejava","description":"This library is used to generate document from a schema","archived":false,"fork":false,"pushed_at":"2017-01-24T04:07:34.000Z","size":54,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-24T16:02:16.849Z","etag":null,"topics":["json","schema","yaml"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastcodejava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-01T19:51:01.000Z","updated_at":"2018-01-09T19:57:31.000Z","dependencies_parsed_at":"2023-01-25T20:35:11.049Z","dependency_job_id":null,"html_url":"https://github.com/fastcodejava/schematodoc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastcodejava%2Fschematodoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastcodejava%2Fschematodoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastcodejava%2Fschematodoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastcodejava%2Fschematodoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastcodejava","download_url":"https://codeload.github.com/fastcodejava/schematodoc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastcodejava%2Fschematodoc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259265495,"owners_count":22831175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","schema","yaml"],"created_at":"2024-12-15T18:39:50.198Z","updated_at":"2025-06-11T12:36:32.845Z","avatar_url":"https://github.com/fastcodejava.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# schematodoc Document\n\nThis library is used to generate document from a schema.\nThe schema can be in a json file or in a yaml file.\nWhen a json schema is used, we get the documentation for the root key.\nWhen a yaml file is used, we get the documentation for a particular URL and it method.\n\n## Use with Node\n\n    $ npm install schematodoc\n\t\n# Usage\n\nThe module need to be executed from another js file. This module generates the documentation in a particular format.\nOne can use that to get the document in the desired format. \n\nTo execute:\n\nPlease do install using `npm install schematodoc` and create a file `test.js` in the app root as shown below.\n\n```js\nvar gen = require('schematodoc');\nvar inputFile = './api/swagger/swagger.yaml'; //path to yaml file\n\nvar url = 'my_url';\nvar method = 'post';\ngen.generateDocFromSwagger(inputFile, url, method, {save: true, outputFile: inputFile});\n```\n\nThe generated documentation will be written in the given file.\n\nOne can customize the output according to one's needs. You have to create a function similar to the one : https://github.com/fastcodejava/schematodoc/blob/master/lib/generateOutput.js \nand supply the function as shown below :\n\n```js\ngen.generateDocFromSwagger(inputFile, url, method, {save: true, outputFile: inputFile}, mygenFunc);\n```\n\n\n```js\nvar gen = require('schematodoc');\nvar inputFile = './api/swagger/swagger.yaml'; //path to yaml file\n\nvar url = 'my_url';\nvar method = 'post';\ngen.generateDocFromSwagger(inputFile, url, method, {save: false});\n```\n\t\nThe generated documentation will be written in the console.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastcodejava%2Fschematodoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastcodejava%2Fschematodoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastcodejava%2Fschematodoc/lists"}