openapi: Builds OpenAPI objects

Description Usage Arguments Details

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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


RestRserve documentation built on Jan. 13, 2021, 7:05 p.m.