Replies: 3 comments 4 replies
-
I believe it would be better if Otherwise the support for That said, I am not at least at the moment able to take a lead to maintain and add support for these types but if no volunteers are to be found, perhaps I will eventually add support for these types. |
Beta Was this translation helpful? Give feedback.
-
I have done a simplistic implementation using {
"openapi": "3.0.3",
"info": {
"title": "geo-types",
"description": "Geospatial primitive data types",
"license": {
"name": "MIT OR Apache-2.0"
},
"version": "0.7.9"
},
"paths": {},
"components": {
"schemas": {
"Coord": {
"type": "object",
"description": "A lightweight struct used to store coordinates on the 2-dimensional\nCartesian plane.\n\nUnlike `Point` (which in the future may contain additional information such\nas an envelope, a precision model, and spatial reference system\ninformation), a `Coord` only contains ordinate values and accessor\nmethods.\n\nThis type implements the [vector space] operations:\n[`Add`], [`Sub`], [`Neg`], [`Zero`],\n[`Mul<T>`][`Mul`], and [`Div<T>`][`Div`] traits.\n\n# Semantics\n\nThis type does not represent any geospatial primitive,\nbut is used in their definitions. The only requirement\nis that the coordinates it contains are valid numbers\n(for eg. not `f64::NAN`).\n\n[vector space]: //en.wikipedia.org/wiki/Vector_space",
"required": [
"x",
"y"
],
"properties": {
"x": {
"$ref": "#/components/schemas/T"
},
"y": {
"$ref": "#/components/schemas/T"
}
}
},
"Point": {
"$ref": "#/components/schemas/Coord"
}
}
}
} And when including both |
Beta Was this translation helpful? Give feedback.
-
Closing this for now, since there is new generics implementation coming up in #1034 and external schemas is bit out of scope or more or less near impossible. |
Beta Was this translation helpful? Give feedback.
-
Would this project accept support for geo_types ?
Or should I instead be trying to get utoipa support added to
geo_types
? I note that they dont have other similar types of support features in their https://github.com/georust/geo/blob/main/geo-types/Cargo.tomlBeta Was this translation helpful? Give feedback.
All reactions