Skip to content

Param validation  #69

@jonthegeek

Description

@jonthegeek

Summary

As an author of a package generated by beekeeper, in order to ensure that my users don't waste their time with bad API calls, I'd like to validate function arguments whenever possible.

Details

Use oas_format_registry$to_r to determine a check function for each variable in functions generated via .generate_paths(). This will require updates to inst/templates/paths.R, as well as probably at least one new helper function in R/generate_pkg-paths.R. For each check function that does not begin with "todo_", use stbl::{to_r}({name}) to check that parameter in req_{{api_abbr}}_{{operation_id}}() (generated via inst/templates/paths.R.

Any tests updated by this change should gain a "#69" tag, and any new tests should have their descriptions tagged with "(#69)", such as "Generated path functions validate inputs when possible (#69)".

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions