adorn-api 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -154,7 +154,7 @@ function analyzeMethod(node, className, checker) {
154
154
  }
155
155
  const pathParamNames = extractPathParams(path4);
156
156
  const pathParamIndices = matchPathParamsToIndices(pathParamNames, parameters);
157
- const { bodyParamIndex, queryParamIndices, queryObjectParamIndex, headerObjectParamIndex, cookieObjectParamIndex, bodyContentType } = classifyParameters(parameters, httpMethod, pathParamIndices, checker);
157
+ const { bodyParamIndex, queryParamIndices, queryObjectParamIndex, headerObjectParamIndex, cookieObjectParamIndex, paginationParamIndex, bodyContentType } = classifyParameters(parameters, httpMethod, pathParamIndices, checker);
158
158
  return {
159
159
  methodName,
160
160
  httpMethod,
@@ -170,6 +170,7 @@ function analyzeMethod(node, className, checker) {
170
170
  queryObjectParamIndex,
171
171
  headerObjectParamIndex,
172
172
  cookieObjectParamIndex,
173
+ paginationParamIndex,
173
174
  bodyContentType
174
175
  };
175
176
  }
@@ -195,6 +196,7 @@ function classifyParameters(parameters, httpMethod, pathParamIndices, checker) {
195
196
  let queryObjectParamIndex = null;
196
197
  let headerObjectParamIndex = null;
197
198
  let cookieObjectParamIndex = null;
199
+ let paginationParamIndex = null;
198
200
  const isBodyMethod = ["POST", "PUT", "PATCH"].includes(httpMethod);
199
201
  for (let i = 0; i < parameters.length; i++) {
200
202
  const param = parameters[i];
@@ -221,6 +223,11 @@ function classifyParameters(parameters, httpMethod, pathParamIndices, checker) {
221
223
  usedIndices.add(i);
222
224
  continue;
223
225
  }
226
+ if (typeStr === "PaginationParams") {
227
+ paginationParamIndex = i;
228
+ usedIndices.add(i);
229
+ continue;
230
+ }
224
231
  if (isBodyMethod && bodyParamIndex === null) {
225
232
  bodyParamIndex = i;
226
233
  usedIndices.add(i);
@@ -241,6 +248,7 @@ function classifyParameters(parameters, httpMethod, pathParamIndices, checker) {
241
248
  queryObjectParamIndex,
242
249
  headerObjectParamIndex,
243
250
  cookieObjectParamIndex,
251
+ paginationParamIndex,
244
252
  bodyContentType: void 0
245
253
  };
246
254
  }
@@ -1141,7 +1149,8 @@ function buildOperationEntry(op, ctx) {
1141
1149
  path: [],
1142
1150
  query: [],
1143
1151
  headers: [],
1144
- cookies: []
1152
+ cookies: [],
1153
+ paginationParamIndex: op.paginationParamIndex
1145
1154
  };
1146
1155
  buildPathArgs(op, ctx, args);
1147
1156
  buildQueryArgs(op, ctx, args);