{"id":18251846,"url":"https://github.com/achiku/prmdg","last_synced_at":"2025-04-04T16:32:42.311Z","repository":{"id":19760410,"uuid":"84632652","full_name":"achiku/prmdg","owner":"achiku","description":"prmd JSON Hyper Schema to Go struct, and validators","archived":false,"fork":false,"pushed_at":"2022-10-30T06:24:54.000Z","size":96,"stargazers_count":2,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T15:40:15.728Z","etag":null,"topics":["golang","json-hyper-schema","json-schema","prmd"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/achiku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-11T07:35:45.000Z","updated_at":"2021-09-08T01:50:39.000Z","dependencies_parsed_at":"2022-07-23T13:47:42.521Z","dependency_job_id":null,"html_url":"https://github.com/achiku/prmdg","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achiku%2Fprmdg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achiku%2Fprmdg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achiku%2Fprmdg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achiku%2Fprmdg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/achiku","download_url":"https://codeload.github.com/achiku/prmdg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247209632,"owners_count":20901829,"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":["golang","json-hyper-schema","json-schema","prmd"],"created_at":"2024-11-05T09:48:36.705Z","updated_at":"2025-04-04T16:32:41.875Z","avatar_url":"https://github.com/achiku.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prmdg\n\n[![Build Status](https://travis-ci.org/achiku/prmdg.svg?branch=master)](https://travis-ci.org/achiku/prmdg)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/achiku/prmdg/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/achiku/prmdg)](https://goreportcard.com/report/github.com/achiku/prmdg)\n\nprmd style JSON Hyper Schema to Go structs, and validators\n\n\n## Why created\n\n## Prerequisite\n\n```\ngo get -u golang.org/x/tools/cmd/goimports\n```\n\n`prmdg` applies `goimports` to the ourput file.\n\n## Installation\n\n```\ngo get -u github.com/achiku/prmdg\n```\n\nIf you want to use `github.com/gureg/null` in Go struct by adding `--nullable` option, you need to install `github.com/gureg/null` first.\n\n## Usage\n\n```\nusage: prmdg --file=FILE [\u003cflags\u003e] \u003ccommand\u003e [\u003cargs\u003e ...]\n\nprmd generated JSON Hyper Schema to Go\n\nFlags:\n      --help            Show context-sensitive help (also try --help-long and --help-man).\n  -p, --package=\"main\"  package name for Go file\n  -f, --file=FILE       path JSON Schema\n  -o, --output=OUTPUT   path to Go output file\n\nCommands:\n  help [\u003ccommand\u003e...]\n    Show help.\n\n  struct [\u003cflags\u003e]\n    generate struct file\n\n  jsval\n    generate validator file using github.com/lestrrat-go/go-jsval\n\n  validator\n    generate validator file using github.com/go-playground/validator\n\n```\n\n## Generating struct from JSON Hyper Schema\n\n```\nusage: prmdg struct [\u003cflags\u003e]\n\ngenerate struct file\n\nFlags:\n      --help            Show context-sensitive help (also try --help-long and --help-man).\n  -p, --package=\"main\"  package name for Go file\n  -f, --file=FILE       path JSON Schema\n  -o, --output=OUTPUT   path to Go output file\n      --validate-tag    add `validate` tag to struct\n      --use-title       use title tag in request/response struct name\n      --nullable        use github.com/guregu/null for null value\n```\n\n\n## Generating validator from JSON Hyper Schema\n\n```\nusage: prmdg jsval\n\ngenerate validator file using github.com/lestrrat-go/go-jsval\n\nFlags:\n      --help            Show context-sensitive help (also try --help-long and --help-man).\n  -p, --package=\"main\"  package name for Go file\n  -f, --file=FILE       path JSON Schema\n  -o, --output=OUTPUT   path to Go output file\n\n```\n\n\n```\nusage: prmdg validator\n\ngenerate validator file using github.com/go-playground/validator\n\nFlags:\n      --help            Show context-sensitive help (also try --help-long and --help-man).\n  -p, --package=\"main\"  package name for Go file\n  -f, --file=FILE       path JSON Schema\n  -o, --output=OUTPUT   path to Go output file\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachiku%2Fprmdg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fachiku%2Fprmdg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachiku%2Fprmdg/lists"}