Skip to content

Commit

Permalink
Remove unused method param
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Sep 21, 2024
1 parent 9d86275 commit 409ecdd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/api/autogen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class DeviceMethod {
assertEmpty(otherResponses, 'Unexpected response status codes');
assert.deepEqual(error400, { $ref: '#/components/responses/400' });
assert.deepEqual(error500, { $ref: '#/components/responses/500' });
this.returnType = new TypeContext(method, 'Response', device).handleContent(
this.returnType = new TypeContext('Response', device).handleContent(
name,
'application/json',
success
Expand Down Expand Up @@ -469,7 +469,6 @@ function handleIntFormat(format: string | undefined): RustType {

class TypeContext {
constructor(
private readonly method: 'Get' | 'Put',
private readonly baseKind: 'Request' | 'Response',
private readonly device: Device
) {}
Expand Down Expand Up @@ -661,7 +660,7 @@ for (let [path, methods = err('Missing methods')] of Object.entries(

let method = new DeviceMethod(device, 'Get', methodPath, get);

let paramCtx = new TypeContext('Get', 'Request', device);
let paramCtx = new TypeContext('Request', device);

for (let param of params.map(resolveMaybeRef)) {
assert.ok(!isRef(param));
Expand Down Expand Up @@ -695,7 +694,7 @@ for (let [path, methods = err('Missing methods')] of Object.entries(
put
);

let argsType = new TypeContext('Put', 'Request', device).handleContent(
let argsType = new TypeContext('Request', device).handleContent(
method.name,
'application/x-www-form-urlencoded',
put.requestBody
Expand Down

0 comments on commit 409ecdd

Please sign in to comment.