How to define sub-packages for models and operations? #2852
Unanswered
karaatanassov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there way to specify models sub-package inside the Swagger 2.0 spec or some sidecar spec?
Is there way to define more than one level of packages for operations?
I am new to this tool and may be asking a silly and possibly trivial question that I could not find the answer to from docs. Apologies if so. I read how models are emitted (https://goswagger.io/use/model.html). It seems models always land in a single package. While operations are distributed in packages names after the first label /
The API I want to generate bindings for is a large one (1000+ objects) and I would like to arrange the client stubs and data models into hierarchy of packages. The package layout for both operations and models should be 3 levels deep to allow for human interaction. As well the golang compiler seems to be optimized for many small packages and seems to dislike packages with thousands of objects.
tags
for operations allow seem to allows for one level of packages defined by the first tag on the operation. Any following tags are ignored. I also experimented with dot.
and slash/
in the tag value and neither works.Beta Was this translation helpful? Give feedback.
All reactions