rametta / rapini

:leafy_green: OpenAPI to React Query (or SWR) & Axios
Apache License 2.0
152 stars 18 forks source link

The promise rejected with the reason "Missing "operationId" from "get" request with pattern /api/configuration/{orgId}/meterType".] #32

Closed cn-johndpope closed 1 year ago

cn-johndpope commented 1 year ago

npx rapini react-query v4 -p openapi.yaml Generating React Query v4 package using OpenApi file openapi.yaml API name: SETFlowAPI, Version: 1.0 DeprecationWarning: 'createImportDeclaration' has been deprecated since v4.8.0. Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter. node:internal/process/promises:279 triggerUncaughtException(err, true / fromPromise /); ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Missing "operationId" from "get" request with pattern /api/configuration/{orgId}/meterType".] {

I use this yaml https://gist.github.com/cn-johndpope/3597fb777ce43041801d661ca4b75ca7

I added operationId: to each get /post but no joy.

cn-johndpope commented 1 year ago

npx rapini --version 2.3.0

cn-johndpope commented 1 year ago

my bad - need to nestled the operationId under get.