Closed doheide closed 7 months ago
Can you help me understand a bit better how this would be useful for people?
One question I have, why would you want the OpenAPI documentation when we already have the generated rustdocs? It might be reasonable, I'm just not familiar with swagger/okapi and how/why people use it.
I think it's for web services that consume or return serialized geojson
values. So it's for documenting apps that use this crate, and maybe automatically generating client code for different languages.
It seems unfortunate, though, that we need to support this here. What if another OpenAPI implementation shows up? Do we support that one too?
Could this be committed upstream like the other implementations?
If it is commited here and not contributed upstream instead, I'd suggest the flag should be schemars
and not include anything okapi
-specific. Support for schemars
is useful outside of okapi
.
You should be able to use any serde-enabled crate with schemars, and this serde already available for this crate. I'm going to close this since I don't think it makes sense for the geojson
crate to contain this functionality
You won't get a precise JsonSchema
if you only have a serde-enabled crate. Their documentation is specific about the schema being less precise. So it would be better if it's actually implemented properly for the geojson
types, whether it's implemented here or in schemars
.
You should be able to use any serde-enabled crate with schemars, and this serde already available for this crate. I'm going to close this since I don't think it makes sense for the
geojson
crate to contain this functionality
The GeoJSON format is literally there as an exchange format for geometric data - how does it not make sense for the geojson
crate to then also contain a schema implementation for said format?
how does it not make sense for the geojson crate to then also contain a schema implementation for said format?
Because there is already a JSON Schema GeoJSON implementation. If you feel that there is a specific need for this crate to provide its own implementation, please open a PR making a case for it.
Okapi allows automated OpenAPI (AKA Swagger) document generation.
[ ] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.