https://github.com/googleapis/gnostic -- generate-gnostic --v3 don't know?
go install github.com/googleapis/gnostic
go install github.com/googleapis/gnostic/plugins/gnostic-go-generator/
gnostic linodeapi3.yaml --go-generator-out=linodeapi3
alias retab='vim -s <(echo -e "gg=G\n:retab\nZZ")'
With every attempted fix, I rerun:
( cd ../; gnostic linode/linodeapi3.yaml --go-generator-out=linode 2> linode/output.txt ; go build 2>> linode/output.txt ); sed -i '' 's/&interface{}{}/struct{}{}/g' client.go; for a in *go; do retab $a; done; git diff -w
2018/03/24 07:47:49 unimplemented: type:"array" items:<schema:<type:"array" items:<schema:<example:<yaml:"- 1521483600000\n- 0.42\n" > type:"number" > > > > description:"Percentage of CPU used.\n"
2018/03/24 07:47:49 unimplemented: specification_extension:<name:"x-linode-filterable" value:<yaml:"true\n" > >
2018/03/24 07:47:49 unimplemented: read_only:true description:"This is the location where the Linode was deployed. This cannot be changed without opening a support ticket.\n" specification_extension:<name:"x-linode-filterable" value:<yaml:"true\n" > >
2018/03/24 07:47:49 unimplemented: read_only:true description:"This will show one of the following conditions, which Linode Distribution image this Linode was created with, which Linode Distribution was booted if there are multiple disks attached to the Linode Config, or `null` if neither of those conditions were met.\n" specification_extension:<name:"x-linode-filterable" value:<yaml:"true\n" > >
2018/03/24 07:47:49 unimplemented: read_only:true description:"This is the Linode service plan type that this Linode was deployed with.\n\nTo change a Linode's type, use `POST /linode/instances/{linodeId}/resize`.\n"
2018/03/24 07:47:49 unimplemented: specification_extension:<name:"x-linode-filterable" value:<yaml:"true\n" > >
2018/03/24 07:47:49 unimplemented: read_only:true type:"array" items:<schema:<example:<yaml:"654\n" > type:"integer" format:"int32" > > description:"An array of Managed Service ids that were affected by this issue.\n"
2018/03/24 07:47:49 unimplemented: type:"array" items:<schema:<example:<yaml:"9991\n" > type:"integer" format:"int32" > > description:"An array of ManagedCredential ids that should be used when attempting to resolve issues with this service.\n"
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Event" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Invoice" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/InvoiceItem" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Notification" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/OAuthClient" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"label" required:"redirect_uri" all_of:<reference:<_ref:"#/components/schemas/OAuthClient" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"public" value:<schema:<example:<yaml:"false\n" > type:"boolean" description:"Whether to create a public of private client." > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Payment" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/User" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"username" required:"email" required:"password" all_of:<reference:<_ref:"#/components/schemas/User" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"email" value:<schema:<example:<yaml:"example_user@linode.com\n" > type:"string" description:"The new user's email address.\n" format:"email" > > > additional_properties:<name:"password" value:<schema:<example:<yaml:"hunter7\n" > type:"string" description:"The password this user will user to log in.\n" > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Domain" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Linode" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Volume" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/LinodeConfig" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Kernel" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/StackScript" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/LinodeType" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/ManagedContact" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/ManagedCredential" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"label" all_of:<reference:<_ref:"#/components/schemas/ManagedCredential" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"username" value:<schema:<example:<yaml:"johndoe\n" > max_length:5000 type:"string" description:"The username to use when accessing the Managed Service.\n" > > > additional_properties:<name:"password" value:<schema:<example:<yaml:"hunter7\n" > max_length:5000 type:"string" description:"The password to use when accessing the Managed Service.\n" > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/ManagedIssue" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/ManagedLinodeSettings" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/ManagedService" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"label" all_of:<reference:<_ref:"#/components/schemas/ManagedService" > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/IPAddress" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"type" required:"linode_id" properties:<additional_properties:<name:"type" value:<schema:<example:<yaml:"ipv4\n" > enum:<yaml:"ipv4\n" > type:"string" description:"The type of address you are requesting. Right now, only public ipv4 addresses may be allocated through this endpoint.\n" > > > additional_properties:<name:"linode_id" value:<schema:<example:<yaml:"123\n" > type:"integer" description:"The ID of a Linode you you have access to that this address will be allocated to.\n" format:"int32" > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/LongviewClient" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/LongviewSubscription" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"region" required:"assignments" properties:<additional_properties:<name:"region" value:<schema:<example:<yaml:"us-east\n" > type:"string" description:"The ID of the region in which these assignments are to take place. All IPs and Linodes must exist in this region.\n" > > > additional_properties:<name:"assignments" value:<schema:<type:"array" items:<schema:<type:"object" properties:<additional_properties:<name:"address" value:<schema:<example:<yaml:"12.34.56.789\n" > type:"string" description:"Ths IP Address for this assignment. Must be a v4 address you can access in the region specified. May be a public or private address.\n" format:"ip" > > > additional_properties:<name:"linode_id" value:<schema:<example:<yaml:"123\n" > type:"integer" description:"The ID of the Linode to assign this address to. The IP's previous Linode will lose this address, and must end up with at least one public address and no more than one private address once all assignments have been made.\n" format:"int32" > > > > > > description:"The list of assignments to make. You must have read_write access to all IPs being assigned and all Linodes being assigned to in order for the assignments to succeed.\n" > > > >
2018/03/24 07:47:49 unimplemented: required:"linode_id" required:"ips" properties:<additional_properties:<name:"linode_id" value:<schema:<example:<yaml:"123\n" > type:"integer" description:"The ID of the Linode that the addresses will be shared with.\n" format:"int32" > > > additional_properties:<name:"ips" value:<schema:<type:"array" items:<schema:<example:<yaml:"12.34.56.789\n" > type:"string" format:"ip" > > description:"A list of IPs that will be shared with this Linode. When this is finished, the given Linode will be able to bring up these addresses in addition to the Linodes that these addresses belong to. You must have access to all of these addresses and they must be in the same region as the Linode.\n" > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/NodeBalancer" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"region" properties:<additional_properties:<name:"region" value:<schema:<example:<yaml:"us-east\n" > type:"string" description:"The ID of the region to create this NodeBalancer in.\n" > > > additional_properties:<name:"label" value:<reference:<_ref:"#/components/schemas/NodeBalancer/properties/label" > > > additional_properties:<name:"client_conn_throttle" value:<reference:<_ref:"#/components/schemas/NodeBalancer/properties/client_conn_throttle" > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/NodeBalancerConfig" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/NodeBalancerNode" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/NodeBalancerNode" > > all_of:<schema:<required:"label" required:"address" > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Region" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/Volume" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/Volume" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"region" value:<reference:<_ref:"#/components/schemas/Region/properties/id" > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/Volume" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"region" value:<reference:<_ref:"#/components/schemas/Region/properties/id" > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/DomainRecord" > > > > > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/AuthorizedApp" > > > > > > > >
2018/03/24 07:47:49 unimplemented: properties:<additional_properties:<name:"secret" value:<schema:<example:<yaml:"5FXX6KLACOC33GTC\n" > type:"string" description:"Your two-factor secret. This is used to generate time-based two factor codes required for login. Doing this will be required to confirm TFA an actually enable it.\n" > > > additional_properties:<name:"expiry" value:<schema:<example:<yaml:"2018-03-01T00:01:01\n" > type:"string" description:"When this Two Factor secret expires.\n" format:"date-time" > > > >
2018/03/24 07:47:49 unimplemented: properties:<additional_properties:<name:"tfa_code" value:<schema:<example:<yaml:"\"213456\"\n" > type:"string" description:"The Two Factor code you generated with your Two Factor secret. These codes are time-based, so be sure it is current.\n" > > > >
2018/03/24 07:47:49 unimplemented: properties:<additional_properties:<name:"scratch" value:<schema:<example:<yaml:"sample two factor scratch\n" > type:"string" description:"A one-use code that can be used in place of your Two Factor code, in case you are unable to generate one. Keep this in a safe place to avoid being locked out of your account.\n" > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/PersonalAccessToken" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"label" properties:<additional_properties:<name:"scopes" value:<schema:<example:<yaml:"'*'\n" > type:"string" description:"The scopes to create the token with. These cannot be changed after creation, and may not exceed the scopes of the acting token. If omitted, the new token will have the same scopes as the acting token.\n" format:"oauth-scope" > > > additional_properties:<name:"expiry" value:<schema:<type:"string" description:"When this token should be valid until. If omitted, the new token will be valid until it is manually revoked.\n" format:"date-time" > > > additional_properties:<name:"label" value:<reference:<_ref:"#/components/schemas/PersonalAccessToken/properties/label" > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/SupportTicket" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"file" properties:<additional_properties:<name:"file" value:<schema:<example:<yaml:"/Users/LinodeGuy/pictures/screen_shot.jpg\n" > type:"string" description:"The local, absolute path to the file you want to attach to your Support Ticket.\n" > > > >
2018/03/24 07:47:49 unimplemented: all_of:<reference:<_ref:"#/components/schemas/PaginationEnvelope" > > all_of:<schema:<type:"object" properties:<additional_properties:<name:"data" value:<schema:<type:"array" items:<reference:<_ref:"#/components/schemas/SupportTicketReply" > > > > > > > >
2018/03/24 07:47:49 unimplemented: required:"description" properties:<additional_properties:<name:"description" value:<schema:<example:<yaml:"|\n Thank you for your help. I was able to figure out what the problem was and I successfully reset my password. You guys are the best!\n" > max_length:65535 min_length:1 type:"string" description:"The content of your reply.\n" > > > >
2018/03/24 07:47:49 Syntax errors in generated code:
client.go:110:14: expected expression
client.go:140:27: expected ';', found ':'
client.go:202:14: expected expression
client.go:236:14: expected expression
client.go:266:27: expected ';', found ':'
client.go:324:27: expected ';', found ':'
client.go:355:27: expected ';', found ':'
client.go:385:27: expected ';', found ':'
client.go:397:14: expected ')', found ':'
client.go:397:562: unknown escape sequence
client.go:404:169: expected 'IDENT', found ':'
2018/03/24 07:47:49 Syntax errors in generated code:
server.go:318:47: missing ',' in argument list
server.go:318:263: unknown escape sequence
server.go:319:1: missing ',' in argument list
server.go:320:38: missing ',' before newline in composite literal
server.go:321:37: missing ',' before newline in composite literal
server.go:322:2: expected operand, found 'return'
server.go:329:1: missing ',' in composite literal
server.go:330:1: expected operand, found 'if'
server.go:332:11: missing ',' in composite literal
server.go:333:31: missing ',' before newline in composite literal
server.go:334:3: expected operand, found 'return'
2018/03/24 07:47:50 Syntax errors in generated code:
types.go:37:18: expected ';', found '{'
types.go:40:1: expected '}', found 'type'
types.go:121:18: expected ';', found ':'
types.go:121:107: unknown escape sequence
types.go:121:115: unknown escape sequence
types.go:121:179: unknown escape sequence
types.go:128:1: expected '}', found 'type'
types.go:283:17: expected ';', found '{'
types.go:289:1: expected '}', found 'type'
types.go:304:20: expected ';', found ':'
types.go:304:92: unknown escape sequence
types.go:305:160: unknown escape sequence
types.go:305:233: unknown escape sequence
types.go:306:307: unknown escape sequence
types.go:306:380: unknown escape sequence
types.go:307:122: unknown escape sequence
types.go:307:124: unknown escape sequence
types.go:307:200: unknown escape sequence
types.go:308:92: unknown escape sequence