Skip to content

Commit 04ebbe2

Browse files
committed
ci: fix public api diff
1 parent e7625af commit 04ebbe2

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

.github/workflows/lint.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,7 @@ jobs:
8888

8989
- name: Generate API diff
9090
run: |
91-
cargo public-api diff ${{ github.event.pull_request.base.sha }}..${{ github.sha }}
91+
for f in $(find -mindepth 2 -maxdepth 2 -name Cargo.toml); do
92+
cargo public-api --manifest-path "$f" --all-features diff ${{ github.event.pull_request.base.sha }}..${{ github.sha }} >> /tmp/diff.txt
93+
done
94+
cat /tmp/diff.txt

crates/oas3/src/spec/path_item.rs

+13-15
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,21 @@ pub struct PathItem {
6767
pub trace: Option<Operation>,
6868

6969
/// An alternative `server` array to service all operations in this path.
70-
#[serde(default)]
71-
#[serde(skip_serializing_if = "Vec::is_empty")]
70+
#[serde(default, skip_serializing_if = "Vec::is_empty")]
7271
pub servers: Vec<Server>,
7372

74-
/// A list of parameters that are applicable for all the operations described under this
75-
/// path. These parameters can be overridden at the operation level, but cannot be removed
76-
/// there. The list MUST NOT include duplicated parameters. A unique parameter is defined by
77-
/// a combination of a
78-
/// [name](https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#parameterName)
79-
/// and
80-
/// [location](https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#parameterIn).
81-
/// The list can use the
82-
/// [Reference Object](https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#reference-object)
83-
/// to link to parameters that are defined at the
84-
/// [OpenAPI Object's components/parameters](https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#componentsParameters).
85-
#[serde(default)]
86-
#[serde(skip_serializing_if = "Vec::is_empty")]
73+
/// A list of parameters that are applicable for all the operations described under this path.
74+
///
75+
/// These parameters can be overridden at the operation level, but cannot be removed there. The
76+
/// list MUST NOT include duplicated parameters. A unique parameter is defined by a combination
77+
/// of a [name] and [location] The list can use the [Reference Object] to link to parameters
78+
/// that are defined at the [OpenAPI Object's components/parameters].
79+
///
80+
/// [name]: https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#parameterName
81+
/// [location]: https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#parameterIn
82+
/// [Reference Object]: https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#reference-object
83+
/// [OpenAPI Object's components/parameters]: https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#componentsParameters
84+
#[serde(default, skip_serializing_if = "Vec::is_empty")]
8785
pub parameters: Vec<ObjectOrReference<Parameter>>,
8886

8987
/// Specification extensions.

crates/oas3/src/spec/security_scheme.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub enum SecurityScheme {
2525
description: Option<String>,
2626

2727
name: String,
28+
2829
#[serde(rename = "in")]
2930
location: String,
3031
},

0 commit comments

Comments
 (0)