Skip to content

Conversation

@alessandrovaccaro
Copy link
Contributor

This is a small feature, to allow users to define the swagger info object directly into the swaggerConfig.json file.
It comes handy, as some swagger users customise the info object to fit their needs.
However if no info object is defined in the configuration file, the library will generate it as usual, by reading the package.json properties.

@thiagobustamante if you like this, please let me know if you want me to:

  • describe it in the README
  • add unit tests

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 74.599% when pulling 168d3e0 on alessandrovaccaro:info-block into 16f3c93 on thiagobustamante:master.

@ngraef
Copy link
Collaborator

ngraef commented Apr 10, 2018

Does this accomplish something that the spec property can't already do? Here's an example swaggerconfig.json that includes an extended info object:

{
    "swagger": {
        "name": "My API",
        "version": "1.0.0",
        "description": "API description",
        "basePath": "/v1",
        "spec": {
            "info": {
                "termsOfService": "http://example.com/",
                "contact": {
                    "email": "[email protected]"
                },
                "license": {
                    "name": "License Agreement",
                    "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
                }
            }
        }
    }
}

@thiagobustamante thiagobustamante merged commit db5b2f6 into thiagobustamante:master Apr 10, 2018
@alessandrovaccaro
Copy link
Contributor Author

Ah good, when reading the documentation I've completely missed out that property. I'll close this PR, thank you.

@thiagobustamante
Copy link
Owner

Ops... I merged it. But yes, we do not need it because spec is already merged into the result. I am undoing it

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

Successfully merging this pull request may close these issues.

4 participants