Skip to content

Use singular tag names in swagger.yaml#29071

Merged
dnephin merged 1 commit intomoby:masterfrom
bfirsh:29045-use-singular-tag-names-in-swagger
Dec 2, 2016
Merged

Use singular tag names in swagger.yaml#29071
dnephin merged 1 commit intomoby:masterfrom
bfirsh:29045-use-singular-tag-names-in-swagger

Conversation

@bfirsh
Copy link
Contributor

@bfirsh bfirsh commented Dec 2, 2016

This is required to make the type generation put things in the
correct directory, but unfortunately makes the names in the
documentation menu look a bit crap.

I think the best solution would be to add a x-display-name
extension to tags to determine how the tags show up in the menu,
rather than it depend on the name of the tag. I shall do this in
a follow-up PR - for now, let's fix the breakage.

Fixes #29045

Signed-off-by: Ben Firshman [email protected]

This is required to make the type generation put things in the
correct directory, but unfortunately makes the names in the
documentation menu look a bit crap.

I think the best solution would be to add a `x-display-name`
extension to tags to determine how the tags show up in the menu,
rather than it depend on the name of the tag. I shall do this in
a follow-up PR - for now, let's fix the breakage.

Fixes moby#29045

Signed-off-by: Ben Firshman <[email protected]>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks to resolve the issue. make swagger-gen no longer produces the api/containers types

LGTM

@bfirsh
Copy link
Contributor Author

bfirsh commented Dec 2, 2016

Also – hack/validate/swagger-gen should have caught this, but we can fix that in a follow-up PR too. :)

/cc @dnephin

@dnephin
Copy link
Member

dnephin commented Dec 2, 2016

hack/validate/swagger-gen should have caught this

Yes that was my first thought. I realize now that it only checks for changes in api/types, but it should also check for changes in api/swagger.yaml.

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dnephin dnephin merged commit 334366c into moby:master Dec 2, 2016
@bfirsh bfirsh deleted the 29045-use-singular-tag-names-in-swagger branch December 3, 2016 09:57
bfirsh added a commit to bfirsh/docker that referenced this pull request Dec 14, 2016
In moby#29071, we made the tags the correct name for generating types,
at the expense of the menu in the documentation looking good.

ReDoc now has support for tag display names
( Redocly/redoc#152 ), so we can assign
a more human-friendly name to the menu items.

Signed-off-by: Ben Firshman <[email protected]>
vieux pushed a commit to vieux/docker that referenced this pull request Dec 14, 2016
In moby#29071, we made the tags the correct name for generating types,
at the expense of the menu in the documentation looking good.

ReDoc now has support for tag display names
( Redocly/redoc#152 ), so we can assign
a more human-friendly name to the menu items.

Signed-off-by: Ben Firshman <[email protected]>
(cherry picked from commit 0caa6c2)
Signed-off-by: Victor Vieux <[email protected]>
xianlubird pushed a commit to xianlubird/docker that referenced this pull request Dec 23, 2016
In moby#29071, we made the tags the correct name for generating types,
at the expense of the menu in the documentation looking good.

ReDoc now has support for tag display names
( Redocly/redoc#152 ), so we can assign
a more human-friendly name to the menu items.

Signed-off-by: Ben Firshman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

swagger generation is broken

5 participants