Re: [Geoserver-devel] [GEOS-9886] yaml schemas definitions aren't compatible with OpenAPI (Swagger 2.0) definitions. Generated Swagger clients don't work.

2021-02-06 Thread Brad Hards
I'm not following this 100% (not very familiar with this part of the cde), but 
if I got what you are looking for:

https://github.com/geoserver/geoserver/blob/master/doc/en/api/1.0.0/workspaces.yaml

I guess the test would go into WorkspaceTest:

https://github.com/geoserver/geoserver/blob/master/src/restconfig/src/test/java/org/geoserver/rest/catalog/WorkspaceTest.java

although if its very complex or needs unique setup, you could create a new Test 
in that area.

Brad




___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


[Geoserver-devel] [GEOS-9886] yaml schemas definitions aren't compatible with OpenAPI (Swagger 2.0) definitions. Generated Swagger clients don't work.

2021-02-06 Thread mlebihan
Hello,

/workspaces.yaml/ file on docs page cannot be used to generate a client by
the mean of /Swagger/ client generator.

to summarize : their examples (human written) tells "/create a workspace by
posting {workspace: {name: 'test'}}/" but /swagger-ui.html/ generated for
/workspaces.yaml/ and available too on doc page shows that this /yaml/ would
propose to send a /{name: 'test'}/ instead.

There's a mismatch, and if it is generated by Swagger from this /yaml/ file,
a /Geoserver/ REST client will causes an HTTP 500 error on server side.

I've corrected the /yaml/ declaration for the example of the
/postWorkspaces/ operation, but I don't know in what project I could put
that corrected yaml with a test to show the validity of the correction.
(This will be my first commit on geoserver (fork)).

workspaces.yaml
  

Regards, 

Marc Le Bihan



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-Dev-f3819232.html


___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel