Last chance! 50% off unlimited learning
Sale ends in
Create API object from Swagger specification
get_api(url, config = NULL, ext)
API object
API URL or file (can be json or yaml format)
httr::config() curl options.
the file extension of the API file (either 'yaml' or 'json'). By default, it is obtained from the URL with `tools::file_ext` and should be provided when the file URL is missing an extension.
See also get_operations
and get_schemas
if (FALSE) {
# create operation and schema functions
api_url <- "http://petstore.swagger.io/v2/swagger.json"
api <- get_api(api_url)
operations <- get_operations(api)
schemas <- get_schemas(api)
}
Run the code above in your browser using DataLab