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

How to configure path in api-docs.json #162

Open
skatenerd opened this issue Apr 4, 2017 · 0 comments
Open

How to configure path in api-docs.json #162

skatenerd opened this issue Apr 4, 2017 · 0 comments

Comments

@skatenerd
Copy link

skatenerd commented Apr 4, 2017

When I generate documentation, this line comes out as "path": "/foo.{format}". foo is presumably derived from the name of the controller that serves this route.

Is there any way to change foo to a value that I control?

In particular, foo is inconsistent with the paths contained in the resource-specific documentation. So, in other words, I have:

# api_documentation/foo.json
{
  "apiVersion": "1.0",
  "swaggerVersion": "1.2",
  "basePath": "http://mysite.com",
  "resourcePath": "/bar",
  "apis": [
    {
      "path": "/bar/{param}.json",
      "operations": [
        {
          "summary": "Get a thing",
          "parameters": [{...}],
          "nickname": "FooController#method",
          "method": "get"
        }
      ]
    },
  ]
}
# api_documentation/api-docs.json
{
  "apiVersion": "1.0",
  "swaggerVersion": "1.2",
  "basePath": "http://mysite.com",
  "apis": [
    {
      "path": "/foo.{format}",
      "description": "Get Info On Things"
    }
  ]
}

And I would like to be consistently showing bar instead of foo.

Is there a way to do this without renaming my controller?

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

1 participant