Skip to content

Commit 6b3a03e

Browse files
committed
fix: missed a generated
1 parent 23ad71d commit 6b3a03e

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@ dist/
99
# Rust
1010
target/
1111
output/
12+
13+
# A consumer of this generator does not commit its output, so the default is to
14+
# ignore it. This repository is the exception: it commits golden files and the
15+
# example output, and the tests compare against them. The rule matches at any
16+
# depth, so those two directories need an explicit exception, or a new file in
17+
# them is dropped without a message. Git applies an ignore rule to an untracked
18+
# file only, so the files already committed stayed visible and hid this.
1219
generated/
20+
!crates/oapi-codegen/tests/generated/
21+
!crates/oapi-codegen/tests/generated/**
22+
!examples/bookstore/generated/
23+
!examples/bookstore/generated/**
1324

1425
# Node (Prettier / Commitlint installed in CI)
1526
node_modules/
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Code generated by oapi-codegen-rust. DO NOT EDIT.
2+
3+
/// An explicit `false` rejects an unknown key.
4+
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq)]
5+
#[serde(deny_unknown_fields)]
6+
pub struct Closed {
7+
pub name: String,
8+
#[serde(skip_serializing_if = "Option::is_none")]
9+
pub size: Option<i64>,
10+
}
11+
12+
/// An absent key permits an unknown key and drops it.
13+
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq)]
14+
pub struct Open {
15+
pub name: String,
16+
}

0 commit comments

Comments
 (0)