{"id":15091479,"url":"https://github.com/danijelakraljevic/schema_generator","last_synced_at":"2026-02-08T13:04:36.220Z","repository":{"id":56339568,"uuid":"240353819","full_name":"DanijelaKraljevic/schema_generator","owner":"DanijelaKraljevic","description":"Json schema and swagger docs generator","archived":false,"fork":false,"pushed_at":"2023-01-31T02:27:23.000Z","size":43,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T05:39:29.524Z","etag":null,"topics":["api","database","documentation","generator","json-schema","oas","oas3","php","swagger"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanijelaKraljevic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-13T20:24:57.000Z","updated_at":"2020-11-13T13:29:10.000Z","dependencies_parsed_at":"2023-02-16T14:31:40.743Z","dependency_job_id":null,"html_url":"https://github.com/DanijelaKraljevic/schema_generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DanijelaKraljevic/schema_generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanijelaKraljevic%2Fschema_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanijelaKraljevic%2Fschema_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanijelaKraljevic%2Fschema_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanijelaKraljevic%2Fschema_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanijelaKraljevic","download_url":"https://codeload.github.com/DanijelaKraljevic/schema_generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanijelaKraljevic%2Fschema_generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268448362,"owners_count":24252019,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","database","documentation","generator","json-schema","oas","oas3","php","swagger"],"created_at":"2024-09-25T10:41:18.193Z","updated_at":"2026-02-08T13:04:36.163Z","avatar_url":"https://github.com/DanijelaKraljevic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ch1 align=\"center\"\u003eJson schema generator\u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\nApplication contains several console commands which generate [json schema](https://json-schema.org/) and open API ( [OAS 3](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md) ) docs.\n\n\nCONFIGURATION\n-------------\n\n[PHP](http://php.net/downloads.php) (\u003e 5.4.0) and [Composer](https://getcomposer.org/) are required to have.\nFrom base directory, using CLI call command\n```shell\ncomposer update\n```\n\n### Base\n\nEdit file `config/db.php` with real data for db connection:\n\n```php\nreturn [\n    'class' =\u003e 'yii\\db\\Connection',\n    'dsn' =\u003e 'mysql:host=localhost;dbname=test',\n    'username' =\u003e 'root',\n    'password' =\u003e '1234',\n    'charset' =\u003e 'utf8',\n];\n```\n\n**NOTE:**\n- App will not create database, it should exist beforehand.\n\n\n\n### Modul\n\nEdit file `config/console.php` if the default configuration is not appliable:\n\n```php\n    $config['modules']['generator'] = [\n        'class' =\u003e 'app\\modules\\ConsoleModule',\n\n        // Properties can be changed here\n        //'allowedIPs' =\u003e ['127.0.0.1', '::1'],\n        //'newFileMode' =\u003e '0666';\n        //'newDirMode' =\u003e '0777';\n        //'newFileMode' =\u003e '0666';    ];\n    ];\n```\n\n**NOTE:**\n-Change only commented properties, not the class.\n\n\n### HOW TO USE\n-------------\n\nCall console commands with  `php yii` from base directory of project.\n\n\n```shell\n~/www/schema-generator$ php yii generator/jsonschema --tableName=test --modelClass=Test --httpMethod=Post\n```\n\n**generator/jsonschema:**\n\n* --tableName : correct name of database table\n* --modelClass : name which will be used to generate name of the file\n* --httpMethod: http method to generate the json schema for\n\n**generator/swagger:**\n\n* --tableName : correct name of database table\n* --tableNamePlural : correct name of database table\n\n\n\nFiles will be generated in appropriate directories in /commands/generated directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanijelakraljevic%2Fschema_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanijelakraljevic%2Fschema_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanijelakraljevic%2Fschema_generator/lists"}