Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

openapi description, version, etc

phil 339e231e fd61d9a7

+18 -3
+4
ufos/src/index_html.rs
··· 21 21 SwaggerUIStandalonePreset 22 22 ], 23 23 layout: "StandaloneLayout", 24 + deepLinking: true, 25 + displayRequestDuration: true, 26 + tryItOutEnabled: true, 27 + requestSnippetsEnabled: true 24 28 }); 25 29 }; 26 30 </script>
+14 -3
ufos/src/server.rs
··· 246 246 247 247 let context = Context { 248 248 spec: Arc::new( 249 - api.openapi("UFOs", semver::Version::new(0, 0, 0)) 250 - .json() 251 - .map_err(|e| e.to_string())?, 249 + api.openapi( 250 + "UFOs: Every lexicon in the ATmosphere", 251 + env!("CARGO_PKG_VERSION") 252 + .parse() 253 + .inspect_err(|e| { 254 + log::warn!("failed to parse cargo package version for openapi: {e:?}") 255 + }) 256 + .unwrap_or(semver::Version::new(0, 0, 1)), 257 + ) 258 + .description("Samples and statistics of atproto records by their collection NSID") 259 + .contact_name("part of @microcosm.blue") 260 + .contact_url("https://microcosm.blue") 261 + .json() 262 + .map_err(|e| e.to_string())?, 252 263 ), 253 264 storage: Box::new(storage), 254 265 };