openapi: Builds OpenAPI objects

openapiR Documentation

Builds OpenAPI objects

Description

Facilitates in building OpenAPI description document by creating objects described in https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md

Usage

openapi_create(
  openapi = openapi_openapi_version(),
  info = openapi_info(),
  servers = openapi_servers(),
  ...
)

openapi_openapi_version(openapi_version = "3.0.1")

openapi_info(
  title = "RestRserve OpenAPI",
  version = "1.0",
  description = NULL,
  termsOfService = NULL,
  contact = openapi_contact(),
  license = openapi_license()
)

openapi_servers(servers = list(openapi_server()))

openapi_server(url = "/", description = NULL, variables = NULL)

openapi_contact(name = NULL, url = NULL, email = NULL)

openapi_license(name = NULL, url = NULL)

Arguments

openapi

string, version of open api. For example "3.0.1"

info

infoObject - https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#infoObject. See openapi_info

servers

serverObject - https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#serverObject See openapi_servers

...

other parameters - see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#oasObject

openapi_version

version on OpenAPI

title

the title of the application

version

version of the application

description

description

termsOfService

termsOfService of the application

contact

contact of the maintainer - see openapi_contact

license

license of the api

url

url

variables

a map between a variable name and its value. #The value is used for substitution in the server's URL template.

name

name

email

contact email

Details

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#infoObject


dselivanov/RestRserve documentation built on April 19, 2024, 11:52 p.m.