fb31761bad
Create an API generator middleware for being able to hook the new satellite admin authorization in the endpoints. The commit fixes a bug found in the API generator that caused that fields of types of the same package of the generated code where wrongly added. Concretely: - The package matching was missing in the function middlewareFields, hence it was generating code that referenced types with the package name. - middlewareFields function was not adding the pointer symbol (*) when the type was from the same package where the generated code is written. There is also an accidental enhancement in the API generator because I thought that the bug commented above corresponded to it, rather than removing it, I though that was worthwhile to keep it because it was already implemented. This enhancement allows to use fields in the middleware with packages whose last path part contains `-` or `.`, using a package rename in the import statement. Change-Id: Ie98b303226a8e8845e494f25054867f95a283aa0 |
||
---|---|---|
.. | ||
example | ||
common_test.go | ||
common.go | ||
docgen.go | ||
endpoint_test.go | ||
endpoint.go | ||
gogen_test.go | ||
gogen.go | ||
tsgen.go | ||
tsgenmock.go | ||
tstypes_test.go | ||
tstypes.go |