Download the PHP package swaggest/go-code-builder without Composer
On this page you can find all versions of the php package swaggest/go-code-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download swaggest/go-code-builder
More information about swaggest/go-code-builder
Files in swaggest/go-code-builder
Package go-code-builder
Short Description GO code generation library
License MIT
Homepage https://github.com/swaggest/go-code-builder
Informations about the package go-code-builder
Swaggest JSON-schema enabled Go code builder
This library generates Go mapping structures defined by JSON schema.
Example
schema.
API Documentation
Classes documentation.
Schema extensions
Magic properties (vendor extensions) defined in schema enable special handling.
x-go-type
Can have a value string or an object. Contains type reference that can be used instead of generated type.
If $ignoreXGoType
option is true
value of vendor extension is disregarded and type is generated.
Value examples:
"[]myorg.com/go-null-types::nulltypes.NullString"
"myorg.com/my-app/order.Entity"
"float64"
{"import": {"package": "my-package/domain/orders"}, "type": "Order"}
{"import": {"package": "my-package", "alias": "mp"}, "type": "Order"}
x-nullable
, nullable
If true
schema type is converted to [<type>, "null"]
. Requires $enableXNullable
option.
x-omitempty
A boolean
value to control ,omitempty
presence.
x-generate
A boolean
value to control whether property should be added to generated struct
.
Property with "x-generate": false
will be skipped.
If GoBuilder
option requireXGenerate
is set to true
only properties with "x-generate": true
will be generated.
CLI Tool
You can use json-cli to generate Go structures from command line.
All versions of go-code-builder with dependencies
swaggest/code-builder Version ^0.3.1|dev-master
php Version >=5.6.0
phplang/scope-exit Version ^1.0
swaggest/json-schema Version ^0.12.37
swaggest/json-schema-maker Version ^0.3.2