Skip to content

Commit

Permalink
Updates for S7 0.2.0. (#94)
Browse files Browse the repository at this point in the history
* Updates for S7 0.2.0.
  • Loading branch information
jonthegeek authored Nov 12, 2024
1 parent 5cca05a commit 7c81a6e
Show file tree
Hide file tree
Showing 16 changed files with 88 additions and 86 deletions.
11 changes: 5 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Description: Convert an 'API' description ('APID'), such as one that
(a "rapid"). The rapid object follows the 'OpenAPI Specification' to
make it easy to convert to and from 'API' documents.
License: MIT + file LICENSE
URL: https://jonthegeek.github.io/rapid/,
https://github.com/jonthegeek/rapid
URL: https://rapid.api2r.org/, https://github.com/jonthegeek/rapid
BugReports: https://github.com/jonthegeek/rapid/issues
Depends:
R (>= 3.5.0)
Expand All @@ -23,7 +22,7 @@ Imports:
jsonlite,
purrr,
rlang (>= 1.1.0),
S7 (>= 0.1.1),
S7 (>= 0.2.0),
snakecase,
stbl,
tibble,
Expand All @@ -33,13 +32,13 @@ Imports:
Suggests:
testthat (>= 3.0.0)
Remotes:
jonthegeek/stbl,
mgirlich/tibblify#191
tibblify=mgirlich/tibblify#191
Config/testthat/edition: 3
Config/testthat/parallel: true
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Collate:
'properties.R'
'security.R'
Expand Down
16 changes: 13 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,26 @@ The R object belongs to a new [S7](https://rconsortium.github.io/S7) class, `rap

## Installation

You can install the development version of rapid from [GitHub](https://github.com/) with:
::: {.pkgdown-release}
Install the released version of rapid from [CRAN](https://cran.r-project.org/):

``` r
install.packages("rapid")
```
:::

::: {.pkgdown-devel}
Install the development version of rapid from [GitHub](https://github.com/):

``` r
# install.packages("pak")
pak::pkg_install("jonthegeek/rapid")
pak::pak("jonthegeek/rapid")
```
:::

## Usage

This package will be used by [{beekeeper}](https://jonthegeek.github.io/beekeeper/) and [{mockplumber}](https://jonthegeek.github.io/mockplumber/).
This package will be used by [{beekeeper}](https://beekeeper.api2r.org/) and [{mockplumber}](https://jonthegeek.github.io/mockplumber/).

## Code of Conduct

Expand Down
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,33 @@ strict, opinionated schema.

## Installation

You can install the development version of rapid from
[GitHub](https://github.com/) with:
<div class="pkgdown-release">

Install the released version of rapid from
[CRAN](https://cran.r-project.org/):

``` r
install.packages("rapid")
```

</div>

<div class="pkgdown-devel">

Install the development version of rapid from
[GitHub](https://github.com/):

``` r
# install.packages("pak")
pak::pkg_install("jonthegeek/rapid")
pak::pak("jonthegeek/rapid")
```

</div>

## Usage

This package will be used by
[{beekeeper}](https://jonthegeek.github.io/beekeeper/) and
[{mockplumber}](https://jonthegeek.github.io/mockplumber/).
This package will be used by [{beekeeper}](https://beekeeper.api2r.org/)
and [{mockplumber}](https://jonthegeek.github.io/mockplumber/).

## Code of Conduct

Expand Down
5 changes: 4 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
url: https://jonthegeek.github.io/rapid/
url: https://rapid.api2r.org/
development:
mode: auto
template:
bootstrap: 5
lang: en-US
reference:
- title: rapid object
desc: The main rapid object, containing [all information about the API](https://spec.openapis.org/oas/v3.1.0#openapi-object).
Expand Down
2 changes: 1 addition & 1 deletion man/abstract_oauth2_flow.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/class_contact.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/class_reference.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,23 @@
Code
class_oauth2_authorization_code_flow(mean, mean)
Condition
Error in `class_oauth2_authorization_code_flow()`:
Error:
! Can't coerce `authorization_url` <function> to <character>.

---

Code
class_oauth2_authorization_code_flow("a", mean)
Condition
Error in `class_oauth2_authorization_code_flow()`:
Error:
! Can't coerce `token_url` <function> to <character>.

---

Code
class_oauth2_authorization_code_flow("a", "b", refresh_url = mean)
Condition
Error in `class_oauth2_authorization_code_flow()`:
Error:
! Can't coerce `refresh_url` <function> to <character>.

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@
Code
class_oauth2_implicit_flow(mean)
Condition
Error in `class_oauth2_implicit_flow()`:
Error:
! Can't coerce `authorization_url` <function> to <character>.

---

Code
class_oauth2_implicit_flow("a", refresh_url = mean)
Condition
Error in `class_oauth2_implicit_flow()`:
Error:
! Can't coerce `refresh_url` <function> to <character>.

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
Code
class_oauth2_token_flow("a", refresh_url = mean)
Condition
Error in `class_oauth2_token_flow()`:
Error:
! Can't coerce `refresh_url` <function> to <character>.

---
Expand Down
9 changes: 0 additions & 9 deletions tests/testthat/_snaps/components-security_scheme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,3 @@
Error in `as_security_scheme()`:
! Can't coerce `TRUE` <logical> to <rapid::security_scheme>.

---

Code
as_security_scheme()
Condition
Error in `as_security_scheme()`:
! Can't coerce `x` to <rapid::security_scheme>.
x `x` is missing.

10 changes: 5 additions & 5 deletions tests/testthat/_snaps/info-contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Code
class_contact(name = mean)
Condition
Error in `class_contact()`:
Error:
! Can't coerce `name` <function> to <character>.

---

Code
class_contact(name = c("A", "B"))
Condition
Error in `class_contact()`:
Error:
! `name` must be a single <character>.
x `name` has 2 values.

Expand All @@ -20,15 +20,15 @@
Code
class_contact(name = "A", url = "https://example.com", email = mean)
Condition
Error in `class_contact()`:
Error:
! Can't coerce `email` <function> to <character>.

---

Code
class_contact(name = "A", url = "https://example.com", email = c("A", "B"))
Condition
Error in `class_contact()`:
Error:
! `email` must be a single <character>.
x `email` has 2 values.

Expand All @@ -37,7 +37,7 @@
Code
class_contact(name = "A", url = "https://example.com", email = "not a real email")
Condition
Error in `class_contact()`:
Error:
! `email` must match the provided regex pattern.
x Some values do not match.
* Locations: 1
Expand Down
12 changes: 6 additions & 6 deletions tests/testthat/_snaps/info-license.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Code
class_license(name = mean)
Condition
Error in `class_license()`:
Error:
! Can't coerce `name` <function> to <character>.

---

Code
class_license(name = c("A", "B"))
Condition
Error in `class_license()`:
Error:
! `name` must be a single <character>.
x `name` has 2 values.

Expand All @@ -20,15 +20,15 @@
Code
class_license(name = "A", url = mean)
Condition
Error in `class_license()`:
Error:
! Can't coerce `url` <function> to <character>.

---

Code
class_license(name = "A", url = c("A", "B"))
Condition
Error in `class_license()`:
Error:
! `url` must be a single <character>.
x `url` has 2 values.

Expand All @@ -37,15 +37,15 @@
Code
class_license(name = "A", identifier = mean)
Condition
Error in `class_license()`:
Error:
! Can't coerce `identifier` <function> to <character>.

---

Code
class_license(name = "A", identifier = c("A", "B"))
Condition
Error in `class_license()`:
Error:
! `identifier` must be a single <character>.
x `identifier` has 2 values.

Expand Down
Loading

0 comments on commit 7c81a6e

Please sign in to comment.