Skip to content

Commit

Permalink
chore: bump msrv to 1.75
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Aug 18, 2024
1 parent 60029b1 commit b288449
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- The `spec::ObjectSchema::addition_properties` field is now of type `Option<Schema>`.
- The `spec::Parameter::schema` field is now of type `ObjectOrReference<ObjectSchema>`.
- Add `Operation::extensions` field.
- Minimum supported Rust version (MSRV) is now 1.70.
- Minimum supported Rust version (MSRV) is now 1.75.

## 0.8.1

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ categories = ["data-structures", "development-tools::testing", "parsing"]
repository = "https://github.com/x52dev/oas3-rs"
license = "MIT"
edition = "2021"
rust-version = "1.70"
rust-version = "1.75"

[features]
default = ["validation"]
Expand All @@ -22,7 +22,7 @@ futures-util = "0.3"
http = "1"
log = "0.4"
once_cell = "1"
regex = "1"
regex = "1.5.5"
semver = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand All @@ -38,7 +38,7 @@ reqwest = { version = "0.12", optional = true, features = ["json"] }
assert_matches = "1"
color-eyre = "0.6"
dotenvy = "0.15"
eyre = "0.6"
eyre = "0.6.12"
indoc = "2"
maplit = "1"
pretty_assertions = "1"
Expand Down
37 changes: 24 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
# OAS3

> Structures and tools to parse, navigate and validate [OpenAPI v3.1 Spec][oas3-spec] files.
<!-- prettier-ignore-start -->

Originally based on v3 parts of the [`openapi`](https://crates.io/crates/openapi) crate by [softprops](https://crates.io/users/softprops).
[![crates.io](https://img.shields.io/crates/v/oas3?label=latest)](https://crates.io/crates/oas3)
[![Documentation](https://docs.rs/oas3/badge.svg?version=0.9.0)](https://docs.rs/oas3/0.9.0)
[![dependency status](https://deps.rs/crate/oas3/0.9.0/status.svg)](https://deps.rs/crate/oas3/0.9.0)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/oas3.svg)
<br />
[![CI](https://github.com/x52dev/oas3/actions/workflows/ci.yml/badge.svg)](https://github.com/x52dev/oas3/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/x52dev/oas3/branch/main/graph/badge.svg)](https://codecov.io/gh/x52dev/oas3)
![Version](https://img.shields.io/crates/msrv/oas3.svg)
[![Download](https://img.shields.io/crates/d/oas3.svg)](https://crates.io/crates/oas3)

Additional features:
<!-- prettier-ignore-end -->

- Validation constructors
- Example request/response validation
- Live API conformance testing
<!-- cargo-rdme start -->

## Usage
Structures and tools to parse, navigate and validate [OpenAPI v3.1] specifications.

Note that due to v3.1 being a breaking change from v3.0, you may have trouble correctly parsing
specs in the older format.

## Example

```rust
fn main() {
match oas3::from_path("path/to/openapi.yaml") {
Ok(spec) => println!("spec: {:?}", spec),
Err(err) => println!("error: {}", err)
}
match oas3::from_path("path/to/openapi.yml") {
Ok(spec) => println!("spec: {:?}", spec),
Err(err) => println!("error: {}", err)
}
```

[oas3-spec]: https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md
[OpenAPI v3.1]: https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md

<!-- cargo-rdme end -->
14 changes: 12 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ msrv := ```
msrv_rustup := "+" + msrv

# Check project.
[group("lint")]
check: && clippy
just --unstable --fmt --check
fd --hidden -e=toml --exec-batch taplo format --check
Expand All @@ -17,13 +18,20 @@ check: && clippy
cargo +nightly fmt -- --check

# Format project.
fmt:
[group("lint")]
fmt: update-readmes
just --unstable --fmt
fd --hidden -e=toml --exec-batch taplo format
fd --hidden --type=file -e=md -e=yml --exec-batch prettier --write
cargo +nightly fmt

# Update READMEs from crate root documentation.
[group("lint")]
update-readmes:
cargo rdme --force

# Lint workspace with Clippy.
[group("lint")]
clippy:
cargo clippy --workspace --no-default-features
cargo clippy --workspace --no-default-features --all-features
Expand All @@ -34,10 +42,12 @@ clippy:
downgrade-msrv:
@ echo "No downgrades currently necessary"

# Test workspace using MSRV
# Test workspace using MSRV.
[group("test")]
test-msrv: downgrade-msrv (test msrv_rustup)

# Test workspace.
[group("test")]
test toolchain="":
cargo {{ toolchain }} nextest run --workspace --no-default-features
cargo {{ toolchain }} nextest run --workspace --all-features
Expand Down

0 comments on commit b288449

Please sign in to comment.