Hello,
About workspaces.yaml :
I added the corrected yaml file and a test for
[GEOS-9886] workspaces.yaml doesn't carry correct descriptions of REST
services it presents. (as an effect, a working Swagger client cannot be
generated for it) <https://osgeo-org.atlassian.net/browse/GEOS-9886>
Before creating a pull request to send the corrected
/geoserver/doc/en/api/1.0.0/workspaces.yaml/,
I would like to find a way to put the test I did in geoserver. But it
could a long work, because I don't know how to reproduce all the steps
of my own test project in a manner compatible to geoserver project rules.
And I would like to check the next point to see if it can offer a better
solution too.
About openapi.json generation from existing REST services
When adding this dependency to an application (I've used it's version
1.5.3, compatible with Spring-boot 2.4.1)
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
</dependency>
Swagger/OpenAPI immediately makes available
http://localhost:8080/swagger-ui.html
that produces the same web interface than the one on
Geoserver documentation website.
http://localhost:8080/v3/api-docs
that describes the REST services in a json format (instead of a
yaml one, but I don't know if it matters).
This path can be changed with this property :
springdoc.api-docs.path=/geoserver/rest/v3/api-docs
But to see it if works, I'm lacking Geoserver project knowledge :
For the time of testing (at home only), to see what OpenAPI produces
from Geoserver REST classes,
1) May I (temporarily) add a security rule to authorize path
/v3/api-docs, allowing direct access to
http://localhost:8080/v3/api-docs, and how ?
2) Else may I declare that property, and then : where, to make it
taken into account ?
springdoc.api-docs.path=/geoserver/rest/v3/api-docs
Thanks,
Marc Le Bihan
On 11/02/2021 16:10, Marc LE BIHAN wrote:
I'm working to correct some, but what Gabriel useful work makes me
think about, is that rather than correcting 2.0 yaml version files,
it's more clever to produce immediately correct OpenAPI 3 compatible ones.
And my idea is that the _Geoserver_ rest-config project should be able
to produce them itself, provided it is guided with OpenAPI
documentation annotations to preserve all the documentation work done
before in the yaml files. I'm making attempts, these days.
If I can't, I will PR corrected 2.0 yaml files only, but this when I
will have checked and ensured that :
1) Their declared input and output (that Swagger-UI detects from the
yaml content) match the examples humans wrote in that yaml : it isn't
the case today.
2) A generated client is able to make all methods working in a simple
test (creating, removing, listing workspaces, for example).
Le jeu. 11 févr. 2021 à 11:03, Andrea Aime
<andrea.a...@geo-solutions.it <mailto:andrea.a...@geo-solutions.it>> a
écrit :
On Wed, Feb 10, 2021 at 7:07 PM Marc Le Bihan
<mlebiha...@gmail.com <mailto:mlebiha...@gmail.com>> wrote:
Knowing that yaml (Swagger 2.0) descriptions of Geoserver
config REST services are wrong, it disturbs me to see them
remaining online,
making people believe that they can trust them either for
documentation or generation, and that isn't the case. It's
like you offer SOAP web-services with a wrong WSDL file coming
along...
Good point, I've made a PR warning potential users that the files
are not usable for client generation, and generally outdated:
https://github.com/geoserver/geoserver/pull/4717
<https://github.com/geoserver/geoserver/pull/4717>
We can remove it if/when someone steps up to fix them.
Cheers
Andrea
== GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V <http://goo.gl/it488V> for more information.
== Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S.
Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313
fax: +39 0584 1660272 mob: +39 339 8844549
http://www.geo-solutions.it <http://www.geo-solutions.it>
http://twitter.com/geosolutions_it
<http://twitter.com/geosolutions_it>
------------------------------------------------------- /Con
riferimento alla normativa sul trattamento dei dati personali
(Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati
“GDPR”), si precisa che ogni circostanza inerente alla presente
email (il suo contenuto, gli eventuali allegati, etc.) è un dato
la cui conoscenza è riservata al/i solo/i destinatario/i indicati
dallo scrivente. Se il messaggio Le è giunto per errore, è
tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei
comunque grato se potesse darmene notizia. This email is intended
only for the person or entity to which it is addressed and may
contain information that is privileged, confidential or otherwise
protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or
use of this e-mail or the information herein by anyone other than
the intended recipient is prohibited. If you have received this
email by mistake, please notify us immediately by telephone or
e-mail./
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel