1818
1919[ OASv3.md ] : https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
2020
21- An OpenAPI documentation tool exposing [ OAS 3.0] [ OASv3.md ] models as well as an actix-web wrapper similar
21+ [ OASv3.1.md ] : https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md
22+
23+ An OpenAPI documentation tool exposing [ OAS 3.0] [ OASv3.md ] and [ OpenAPI v3.1.1] [ OASv3.1.md ] models as well as an
24+ actix-web wrapper similar
2225to [ paperclip] ( https://github.com/paperclip-rs/paperclip ) .
2326
2427** Apistos** is composed of these crates:
2528
2629- [ ` apistos ` ] ( ./apistos ) : [ actix-web] ( https://github.com/actix/actix-web ) wrapper to generate an OpenAPI v3.0.3
2730 documentation file
2831- [ ` apistos-core ` ] ( ./apistos-core ) : A set of traits and common models around [ OpenAPI v3.0.3] [ OASv3.md ]
29- - [ ` apistos-gen ` ] ( ./apistos-gen ) : macro utilities to generate [ OpenAPI v3.0.3] [ OASv3.md ] documentation from Rust models
30- - [ ` apistos-models ` ] ( ./apistos-models ) : [ OpenAPI v3.0.3] [ OASv3.md ] models
32+ and [ OpenAPI v3.1.1] [ OASv3.1.md ]
33+ - [ ` apistos-gen ` ] ( ./apistos-gen ) : macro utilities to generate [ OpenAPI v3.0.3] [ OASv3.md ]
34+ and [ OpenAPI v3.1.1] [ OASv3.1.md ] documentation from Rust models
35+ - [ ` apistos-models ` ] ( ./apistos-models ) : [ OpenAPI v3.0.3] [ OASv3.md ] and [ OpenAPI v3.1.1] [ OASv3.1.md ] models
3136 with [ ` Schema ` ] ( https://docs.rs/schemars/latest/schemars/schema/enum.Schema.html ) based
3237 on [ schemars] ( https://github.com/GREsau/schemars ) definition
3338- [ ` apistos-plugins ` ] ( ./apistos-plugins ) : traits and utilities to extend apistos
@@ -59,7 +64,6 @@ carpenters, craftsmen, metallurgy ... which can also be considered by some as th
5964
6065``` toml
6166[dependencies ]
62- schemars = " =1.0.0-alpha.15"
6367apistos = " =1.0.0-pre-release.12"
6468```
6569
@@ -80,20 +84,28 @@ use apistos::api_operation;
8084use apistos :: ApiComponent ;
8185use apistos :: ApiErrorComponent ;
8286use apistos :: app :: OpenApiWrapper ;
87+ use apistos :: info :: Info ;
88+ use apistos :: schemars :: JsonSchema ;
8389use apistos :: spec :: Spec ;
8490use apistos :: web :: {post, resource, scope};
85- use apistos_models :: info :: Info ;
8691use core :: fmt :: Formatter ;
87- use schemars :: JsonSchema ;
8892use serde :: {Deserialize , Serialize };
8993use std :: error :: Error ;
9094use std :: net :: Ipv4Addr ;
9195
9296#[derive(Serialize , Deserialize , Debug , Clone , JsonSchema , ApiComponent )]
97+ #[schemars(crate = " apistos" )]
9398pub struct Test {
9499 pub test : String
95100}
96101
102+ // or
103+ // #[derive(Serialize, Deserialize, Debug, Clone)]
104+ // #[apistos::api_component]
105+ // pub struct Test {
106+ // pub test: String
107+ // }
108+
97109#[derive(Serialize , Deserialize , Debug , Clone , ApiErrorComponent )]
98110#[openapi_error(
99111 status(code = 403),
0 commit comments