Skip to content

Commit

Permalink
Add example for manual typedef information (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schniz committed Nov 21, 2023
1 parent 1856c08 commit eaccaec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 159 deletions.
17 changes: 17 additions & 0 deletions crates/web_api/src/router.rs
Expand Up @@ -95,6 +95,23 @@ pub fn api_router() -> (axum::Router<AppState>, OpenApi) {
..OpenApi::default()
};

// let mut components = aide::openapi::Components {
// ..Default::default()
// };

// components.schemas.insert(
// "hello".to_string(),
// aide::openapi::SchemaObject {
// json_schema: schemars::schema::Schema::Object(
// schemars::schema_for!(NewTaskBody).schema,
// ),
// external_docs: None,
// example: None,
// },
// );

// api.components = Some(components);

let app = ApiRouter::new()
.route("/api", Redoc::new("/api/openapi.json").axum_route())
.route("/api/openapi.json", get(serve_api))
Expand Down
158 changes: 0 additions & 158 deletions packages/api-client/generated/openapi.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/api-client/input/openapi.json

This file was deleted.

0 comments on commit eaccaec

Please sign in to comment.