question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add example of usage of openApiFile for swagger-gradle-plugin

See original GitHub issue

Tried to use the openApiFile configuration in swagger-gradle-plugin but couldn’t figure out how to make it work.

It would be good if we could add an example of the usage in the README.

If someone can help figure out how to use it I can try to make a PR with the updated README.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
frantumacommented, Feb 7, 2019

This again doesn’t map to an OpenAPI file, as it includes root openAPI, the right one in json format would be

{
  "openapi" : "3.0.1",
  "info": {
    "version": "1.0",
    "title": "Swagger Pet Sample App",
    "description": "This is a sample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters.",
    "termsOfService": "http://swagger.io/terms/",
    "contact": {
      "email": "apiteam@swagger.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  }
}

As I mentioned the expected file is not a Swagger configuration but a spec, I would therefore rename openApiFile = file('openapi-configuration.json') to something like openApiFile = file('openapi-input.json')

1reaction
frantumacommented, Feb 7, 2019

you’re right, added a not to readme with example. Closing ticket, please reopen if you’re still experiencing issues

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Examples - Swagger
You can add examples to parameters, properties and objects to make ... For example, an API mocking tool can use sample values to...
Read more >
Swagger API documentation in Play application with Gradle
I want to generate API documentation using swagger. My goal is to generate swagger.json file containing my REST API documentation in JSON format ......
Read more >
How to generate code from OpenAPI definition with Visual ...
We've also seen that you can use the OpenAPI file to navigate the APIs ... After the wizard, Visual Studio adds an OpenAPIs...
Read more >
OpenAPI Definition & Online Tools | Open API Standards List
In addition, you can use the API definition to better collaborate across teams. ... It can be helpful to review some OpenAPI examples...
Read more >
io.swagger.core.v3.swagger-gradle-plugin - Gradle Plugin Portal
Using the plugins DSL: plugins { id "io.swagger.core.v3.swagger-gradle-plugin" version "2.2.7" }. Using legacy plugin application:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found