Open MV10 opened 3 years ago
This is the error message when the schema is missing explicit operationId
values, so it's probably related to this: https://github.com/anttiviljami/openapi-client-axios/issues/19
It seems to me that a better error message is important, so I'm leaving this open for the moment.
That also leads to another question -- can this package be used to invoke APIs by path, as I originally attempted to do in the code I posted above? Our real API is gigantic, it would be unreasonably difficult to generate guaranteed-unique (but useful) operationId
values across the entire API surface.
We have a simple React app, brand new, doesn't do anything but attempt to invoke a single API and dump the contents of the return data, as a first attempt to use this package. I own the API project too, and I can see the request which returns the OpenAPI doc (and I know it's valid, I've used .NET and Java codegen to call it). I'm not sure where or how to troubleshoot this error message.
After the OpenAPI doc is returned, the call to
useOperation
fails with:The OpenAPI JSON is v3.0.1 and it currently has just a single entry in
paths
:This is on a locked-down corporate machine (no Internet access etc) but the code is so simple I'll just retype it here. It's
Root
instead ofApp
because the real React apps are part of a single-spa parent app: