Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias names for Model definitions. #165

Closed
unrelentingfox opened this issue Jun 29, 2017 · 3 comments
Closed

Alias names for Model definitions. #165

unrelentingfox opened this issue Jun 29, 2017 · 3 comments

Comments

@unrelentingfox
Copy link

Is there a way to give my models an alias so they don't include the full package name?

For example: I would like to just show Contact, and Prospect.
image

@slaudat
Copy link

slaudat commented Jan 17, 2018

In your swagger base file you can do this:

---
openapi: 3.0.0
 info:
    title: "API"
    description: "REST API"
    version: "1.0.0"
  components:
    schemas:
      com.mealticket.prospecting.ProspectResource.Contact:
        title: "Contact"

then 'com.mealticket.prospecting.ProspectResource.Contact' will appear as 'Contact' in Swagger UI. There may be other ways to do it, but this works.

@mrwillis
Copy link

@slaudat that problem with this is that it's not dynamic. The generated file gets changed every time.

@Javakky-pxv
Copy link
Collaborator

#146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants