Skip to content

Commit

Permalink
feat: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Mar 26, 2024
1 parent fe9f83d commit 16a047e
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/core/src/protocols/serde/AwsRestXml.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// import { XmlNode } from "[@aws-sdk]/xml-builder";
import { requestBuilder } from "@smithy/core";
import { RuntimeModelInterpreter } from "@smithy/core";
import { ISmithyModelShapeId, ISmithyModelStructureShape } from "@smithy/core";
import { HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, SerdeContext } from "@smithy/types";

export class AwsRestXml extends RuntimeModelInterpreter {
public async serialize<I>(
input: I,
requestShapeId: ISmithyModelShapeId,
context: SerdeContext
): Promise<IHttpRequest> {
const requestShape: ISmithyModelStructureShape = this.getShape(requestShapeId);
const b = requestBuilder(input, context);
const headers = {} as Record<string, string>;
const query = {} as Record<string, string>;
let body: any;
for (const [name, { target, traits }] of Object.entries(requestShape.members)) {
const headerName = traits["smithy.api#httpHeader"];
const isPayload = traits["smithy.api#httpPayload"];
if (traits["smithy.api#httpHeader"]) {
}
}
return null as any;
}

public async deserialize<O>(
httpResponse: IHttpResponse,
responseShapeId: ISmithyModelShapeId,
context: SerdeContext
): Promise<O> {
const responseShape: ISmithyModelStructureShape = this.getShape(responseShapeId);
return null as any;
}
}

0 comments on commit 16a047e

Please sign in to comment.