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

Unable to generate tags with spaces using the spec generation tool #2232

Open
prakkarp opened this issue Feb 18, 2020 · 2 comments
Open

Unable to generate tags with spaces using the spec generation tool #2232

prakkarp opened this issue Feb 18, 2020 · 2 comments
Labels
generate spec Related to spec generation from code scanner spec swagger spec

Comments

@prakkarp
Copy link

In the swagger:route declaration, unable to specify a tag which has a whitespace. Tried putting quotes(single and double) as well as back slash. But it doesn't work. Looks like the only special characters supported are "-" and "_". Is there a way to specify tags which spaces?

Steps to reproduce

Create a function which has a swagger:route declaration.
Example:
// SomeRoute swagger:route GET /some_path "Tag With Spaces" op-id
If I don't specify the double quotes, then three separate tags "Tag", "With", "Spaces" get generated. But if the quotes are specified, then the route will be missing in the generated spec.

Environment

swagger version: 2.0
go version:1.13.8
OS: MacOS

@fredbi fredbi added the generate spec Related to spec generation from code label Mar 11, 2020
@Debro012
Copy link

@prakkarp ,

I was able to get passed this issue in swagger:operation declaration by specifying the tags in Yaml. Here's an example:

// swagger:operation POST /api/notify sendNotification
// ---
// summary: Send notification to users.
// tags:
// - "Notification Delivery"
// description: Accepts a payload containing a list of users to pass the notification to. The notification is sent to each recipient in the list.
// parameters:
// - name: body
// in: body
// description: Payload containing a string value for the notification and the list of users which should receive the notification.
// required: true
// type: object
// schema:
// "$ref": "#/definitions/NotificationMessagePayload"
// responses:
// "200":
// "$ref": "#/definitions/NotificationMessageResponse"

@mnvx
Copy link

mnvx commented Apr 25, 2023

Is any progress with this issue?

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 scanner spec swagger spec
Projects
None yet
Development

No branches or pull requests

4 participants