Add support for aliases and boolean type 59/16459/1
authorOndrej Fabry <ofabry@cisco.com>
Thu, 13 Dec 2018 09:21:49 +0000 (10:21 +0100)
committerOndrej Fabry <ofabry@cisco.com>
Thu, 13 Dec 2018 09:21:49 +0000 (10:21 +0100)
commit868b541e296dc47748ad03b8f0174c828d996529
treea43650ea7d9c96434d536e557177b38c5f84bd34
parent1768c495416997c7a6769c6a92b33b37c89eed25
Add support for aliases and boolean type

- aliases are now generated as new types or arrays (if length > 0)
- bool is recognized as a boolean type and generated as Go bool
- comment with original JSON is now prepended for each object type
- interface Services is now generated at the top of the file to provide
  overview of what RPC services does the current module consists of
- dump services now correctly return slice of the particular details type

Change-Id: I788babc1c0f2de33e0febd87e5b200d54065b244
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
23 files changed:
cmd/binapi-generator/definitions.go
cmd/binapi-generator/generate.go
cmd/binapi-generator/objects.go
cmd/binapi-generator/parse.go
examples/bin_api/acl.api.json
examples/bin_api/acl/acl.ba.go
examples/bin_api/af_packet.api.json
examples/bin_api/af_packet/af_packet.ba.go
examples/bin_api/interface.api.json
examples/bin_api/interfaces/interfaces.ba.go
examples/bin_api/ip.api.json
examples/bin_api/ip/ip.ba.go
examples/bin_api/map.api.json [new file with mode: 0644]
examples/bin_api/maps/maps.ba.go [new file with mode: 0644]
examples/bin_api/memif.api.json
examples/bin_api/memif/memif.ba.go
examples/bin_api/stats.api.json
examples/bin_api/stats/stats.ba.go
examples/bin_api/tap.api.json
examples/bin_api/tap/tap.ba.go
examples/bin_api/vpe.api.json
examples/bin_api/vpe/vpe.ba.go
examples/cmd/union-example/union_example.go