Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(omissis/go-jsonschema): scaffold omissis/go-jsonschema #32271

Merged
merged 2 commits into from
Feb 17, 2025

Conversation

ponkio-o
Copy link
Contributor

@ponkio-o ponkio-o commented Feb 17, 2025

omissis/go-jsonschema: A tool to generate Go data types from JSON Schema definitions

$ aqua g -i omissis/go-jsonschema

Check List

How to confirm if this package works well

Reviewers aren't necessarily familiar with this package, so please describe how to confirm if this package works well.
Please confirm if this package works well yourself as much as possible.

Command and output

root@65781a3f22e7:/workspace# go-jsonschema --help
Generates Go code from JSON Schema files.

Usage:
  go-jsonschema FILE ... [flags]

Flags:
      --capitalization strings      Specify a preferred Go capitalization for a string. For example, by default a field
                                    named 'id' becomes 'Id'. With --capitalization ID, it will be generated as 'ID'.
  -e, --extra-imports               Allow extra imports (non standard library)
  -h, --help                        help for go-jsonschema
      --min-sized-ints              Uses sized int and uint values based on the min and max values for the field
      --only-models                 Generate only models (no unmarshal methods, no validation)
  -o, --output string               File to write (- for standard output) (default "-")
  -p, --package string              Default name of package to declare Go files under, unless overridden with
                                    --schema-package
      --resolve-extension strings   Add a file extension that is used to resolve schema names, e.g. {"$ref": "./foo"} will
                                    also look for foo.json if --resolve-extension json is provided.
      --schema-output strings       File to write (- for standard output) a specific schema ID to;
                                    must be in the format URI=FILENAME.
      --schema-package strings      Name of package to declare Go files for a specific schema ID under;
                                    must be in the format URI=PACKAGE.
      --schema-root-type strings    Override name to use for the root type of a specific schema ID;
                                    must be in the format URI=TYPE. By default, it is derived from the file name.
  -t, --struct-name-from-title      Use the schema title as the generated struct name
      --tags strings                Specify which struct tags to generate. Defaults are json, yaml, mapstructure (default [json,yaml,mapstructure])
  -v, --verbose                     Verbose output
      --yaml-extension strings      Add a file extension that should be recognized as YAML. Default are .yml, .yaml. (default [.yml,.yaml])

If files such as configuration file are needed, please share them.

Reference

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Feb 17, 2025
@suzuki-shunsuke suzuki-shunsuke added this to the v4.315.1 milestone Feb 17, 2025
@suzuki-shunsuke
Copy link
Member

Thank you!

@suzuki-shunsuke suzuki-shunsuke merged commit 7f56e7f into aquaproj:main Feb 17, 2025
17 checks passed
@ponkio-o ponkio-o deleted the feat/omissis/go-jsonschema branch February 17, 2025 10:00
@suzuki-shunsuke
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants