storj/private/apigen/example
Ivan Fraixedes 48d7be7eab
private/apigen: Panic types defined in main package
The API generator was generating invalid code when types were defined in
a main package because the generated Go code was defining in import from
it.

This commit update the Go generator to panic with a explicit error
message if that situation happens.

The commit also add a new endpoint to the example with a named types
(i.e. no anonymous) to show that the Generator works fine with them.

Change-Id: Ieddd89c67048de50516f7ac7787d602660dc4a54
2023-09-26 14:04:33 +02:00
..
myapi private/apigen: Panic types defined in main package 2023-09-26 14:04:33 +02:00
api.gen.go private/apigen: Panic types defined in main package 2023-09-26 14:04:33 +02:00
apidocs.gen.md private/apigen: Panic types defined in main package 2023-09-26 14:04:33 +02:00
client-api.gen.ts private/apigen: Panic types defined in main package 2023-09-26 14:04:33 +02:00
doc.go private/apigen: make code compile with 1.16 2022-09-02 16:34:46 +03:00
gen.go private/apigen: Panic types defined in main package 2023-09-26 14:04:33 +02:00