swagger_spec: Swagger Index File with OpenAPI Path

Description Usage Arguments Value Examples

View source: R/paths.R

Description

Produces the content for a index.html file that will attempt to access a provided API path.

Usage

1
2
3
4
swagger_spec(
  api_path = "\"http://petstore.swagger.io/v2/swagger.json\"",
  version = "3"
)

Arguments

api_path

Path to paste into the an OpenAPI specification file

version

Major version number to be used for Swagger UI. Currently version "3" is compatible with OpenAPI spec 2.0, 3.0.

Value

large string containing the contents of swagger_index() with the appropriate specification path changed to the api_path value.

Examples

1
2
3
if (interactive()) {
  swagger_spec("https://developer.uspto.gov/ibd-api/swagger.json")
}

Example output



swagger documentation built on Oct. 23, 2020, 6:10 p.m.