MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / custom_openapi_spec

Function custom_openapi_spec

examples/rocket_okapi_example/api/src/lib.rs:92–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90}
91
92fn custom_openapi_spec() -> OpenApi {
93 use rocket_okapi::okapi::openapi3::*;
94 OpenApi {
95 openapi: OpenApi::default_version(),
96 info: Info {
97 title: "SeaOrm-Rocket-Okapi Example".to_owned(),
98 description: Some("API Docs for Rocket/SeaOrm example".to_owned()),
99 terms_of_service: Some("https://github.com/SeaQL/sea-orm#license".to_owned()),
100 contact: Some(Contact {
101 name: Some("SeaOrm".to_owned()),
102 url: Some("https://github.com/SeaQL/sea-orm".to_owned()),
103 email: None,
104 ..Default::default()
105 }),
106 license: Some(License {
107 name: "MIT".to_owned(),
108 url: Some("https://github.com/SeaQL/sea-orm/blob/master/LICENSE-MIT".to_owned()),
109 ..Default::default()
110 }),
111 version: env!("CARGO_PKG_VERSION").to_owned(),
112 ..Default::default()
113 },
114 servers: vec![
115 Server {
116 url: "http://127.0.0.1:8000/v1".to_owned(),
117 description: Some("Localhost".to_owned()),
118 ..Default::default()
119 },
120 Server {
121 url: "https://production-server.com/".to_owned(),
122 description: Some("Remote development server".to_owned()),
123 ..Default::default()
124 },
125 ],
126 ..Default::default()
127 }
128}
129
130pub fn main() {
131 let result = start();

Callers 1

startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected