yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I namespace models ?

mackoj opened this issue · comments

Hi @yonaskolb,

The swagger file that I work with has multiple models with the same name on different endpoint which results in model rewriting themselves randomly when I update them.

How can I namespace my model with the same namespace that request have?

Thanks,

Hi @mackoj, not sure I understand. If the models are listed in definitions then they will all be sharing the exact same model. If the models are inline as a schema they should be generated within the request.
Are these request or response models? Do you have an example?

After further research it's my be illegal to do what I explain above.
But when I process this swagger file with swaggen it shows two Categorie, Item, URL, Lien, Menu, Rdv, Search, Review, Sort for exemple on the readme as if there is two versions of them.

I think the swagger file is really wrong don't bother.