Skip to content

Commit d0fd387

Browse files
committed
fix: prefix methods with / in openapi generator
1 parent d34a626 commit d0fd387

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "aisil"
33
description = "A lightweight framework to define APIs as types"
4-
version = "0.3.1"
4+
version = "0.3.2"
55
edition = "2024"
66
repository = "https://github.com/sirewix/aisil"
77
documentation = "https://docs.rs/aisil/latest"

src/post_json/openapi.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ where
4040

4141
let (summary, description) = split_docs(<API as HasMethod<T>>::METHOD_DOCS);
4242
paths.insert(
43-
API::METHOD_NAME.to_string(),
43+
format!("/{}", API::METHOD_NAME),
4444
ReferenceOr::Item(PathItem {
4545
post: Some(Operation {
4646
summary,
@@ -165,7 +165,7 @@ fn test_openapi() {
165165
summary: Some example api
166166
version: '0.0.0'
167167
paths:
168-
get_a:
168+
/get_a:
169169
post:
170170
summary: Get A
171171
requestBody:
@@ -181,7 +181,7 @@ fn test_openapi() {
181181
application/json:
182182
schema:
183183
type: boolean
184-
post_a:
184+
/post_a:
185185
post:
186186
# summary: Post A
187187
requestBody:

0 commit comments

Comments
 (0)