Skip to content

Conversation

@Himenon
Copy link
Owner

@Himenon Himenon commented Apr 1, 2023

Summary

close: #104

https://swagger.io/docs/specification/describing-request-body/#:~:text=The%20serialization%20strategy%20is%20specified%20in%20the%20encoding%20section

+ export interface Encoding {
+     contentType?: string;
+     headers?: Record<string, any>;
+     style?: string;
+     explode?: boolean;
+     allowReserved?: boolean;
+ }
 export interface RequestArgs {
     httpMethod: HttpMethod;
     url: string;
     headers: ObjectLike | any;
     requestBody: ObjectLike | any;
     queryParameters: QueryParameters | undefined;
+    requestBodyEncoding?: Record<string, Encoding>;
 }

Test Plan

snapshot

@Himenon Himenon changed the title WIP feat: support request body encoding option feat: support request body encoding option Apr 1, 2023
});
} else if (convertedParams.requestFirstContentType) {
identifier = factory.Identifier.create({
name: JSON.stringify({ [convertedParams.requestFirstContentType]: encodingMap[convertedParams.requestFirstContentType] }, null, 2),
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add

@Himenon Himenon merged commit 025d53e into main Apr 1, 2023
@Himenon Himenon deleted the feat/support-encoding-option branch April 1, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: encoding option in requestBody is not respected.

2 participants