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

Strfmt: array of UUID #2746

Open
festo opened this issue Mar 24, 2022 · 0 comments
Open

Strfmt: array of UUID #2746

festo opened this issue Mar 24, 2022 · 0 comments
Labels
generate spec Related to spec generation from code question scanner

Comments

@festo
Copy link

festo commented Mar 24, 2022

Problem statement

We're using google's UUID package and generating docs from the struct. If we expect a single uuid, we can use // swagger:strfmt uuid to show a nice example, but in case of an array of uuid, the tool generates this:
Screenshot 2022-03-24 at 11 39 36

It is defined like this:

type FilterBy struct {
	// Example: General
	Name *string `json:"name"`
	VehicleTypes []uuid.UUID `json:"vehicleTypes"`
}

I tried to use swagger:strfmt and the Example as well without luck to show uuids, and not [0]. Do you have a solution for this?

Environment

swagger version: 0.29.0
go version: 1.17.2
OS: MacOS 21.1

@fredbi fredbi added scanner question generate spec Related to spec generation from code labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generate spec Related to spec generation from code question scanner
Projects
None yet
Development

No branches or pull requests

2 participants