Skip to content

Commit 2f484cc

Browse files
committed
openapi: Override derived metadata
1 parent 189e496 commit 2f484cc

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/openapi.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ use utoipa::OpenApi;
22
use utoipa_axum::router::OpenApiRouter;
33

44
#[derive(OpenApi)]
5+
#[openapi(info(
6+
title = "crates.io",
7+
description = "API documentation for the [crates.io](https://crates.io/) package registry",
8+
terms_of_service = "https://crates.io/policies",
9+
contact(name = "the crates.io team", email = "[email protected]"),
10+
license(),
11+
version = "0.0.0",
12+
))]
513
pub struct BaseOpenApi;
614

715
impl BaseOpenApi {

src/snapshots/crates_io__openapi__tests__openapi_snapshot.snap

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ snapshot_kind: text
77
"components": {},
88
"info": {
99
"contact": {
10-
"email": "[email protected]",
11-
"name": "Alex Crichton"
10+
"email": "[email protected]",
11+
"name": "the crates.io team"
1212
},
13-
"description": "Backend of crates.io",
13+
"description": "API documentation for the [crates.io](https://crates.io/) package registry",
1414
"license": {
15-
"name": "MIT OR Apache-2.0"
15+
"name": ""
1616
},
17-
"title": "crates_io",
17+
"termsOfService": "https://crates.io/policies",
18+
"title": "crates.io",
1819
"version": "0.0.0"
1920
},
2021
"openapi": "3.1.0",

0 commit comments

Comments
 (0)