validate_api_spec: Validate OpenAPI Spec

View source: R/validate_api_spec.R

validate_api_specR Documentation

Validate OpenAPI Spec

Description

Validate an OpenAPI Spec using ⁠@redocly/cli⁠.

Usage

validate_api_spec(
  pr,
  ...,
  ruleset = c("minimal", "recommended", "recommended-strict"),
  verbose = TRUE
)

Arguments

pr

A Plumber API

...

Ignored

ruleset

Character that determines the ruleset to use for validation. Can be one of "minimal", "recommended", or "recommended-strict". Defaults to "minimal". See ⁠@redocly/cli⁠ options for more details.

verbose

Logical that determines if a "is valid" statement is displayed. Defaults to TRUE

Details

If any warning or error is presented, an error will be thrown.

This function is [Experimental] and may be altered, changed, or removed in the future.

Examples

## Not run: 
pr <- plumb_api("plumber", "01-append")
validate_api_spec(pr)

## End(Not run)

rstudio/plumber documentation built on April 12, 2025, 7:33 p.m.