1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-05-09 16:10:42 +00:00

start openapi-type codegen

This commit is contained in:
Dominic 2021-03-07 23:09:50 +01:00
parent 90870e3b6a
commit d9c7f4135f
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
9 changed files with 241 additions and 51 deletions

View file

@ -0,0 +1,12 @@
use openapi_type::OpenapiType;
#[derive(OpenapiType)]
struct Foo {
bar: Bar
}
struct Bar;
fn main() {
Foo::schema();
}

View file

@ -0,0 +1,8 @@
error[E0277]: the trait bound `Bar: OpenapiType` is not satisfied
--> $DIR/not_openapitype.rs:3:10
|
3 | #[derive(OpenapiType)]
| ^^^^^^^^^^^ the trait `OpenapiType` is not implemented for `Bar`
|
= note: required by `schema`
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

View file

@ -1,5 +1,5 @@
error[E0599]: no function or associated item named `schema` found for struct `Foo<Bar>` in the current scope
--> $DIR/generics_not_openapitype.rs:11:14
--> $DIR/not_openapitype_generics.rs:11:14
|
4 | struct Foo<T> {
| -------------