Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: type of style property in requestEncodings #110

Merged
merged 2 commits into from
Apr 4, 2023
Merged

Conversation

Thiry1
Copy link
Contributor

@Thiry1 Thiry1 commented Apr 4, 2023

Summary

According to the OpenAPI 3.0 Specification, type of style property in requestEncodings can be "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" instead of string.

Test Plan

export interface Encoding {
  contentType?: string;
  headers?: Record<string, any>;
-  style?: string;
+  style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject";
  explode?: boolean;
  allowReserved?: boolean;
}
- const requestEncodings = {
+ const requestEncodings: Record<string, Record<string, Encoding>> = {
  "application/x-www-form-urlencoded": {
      "foo": {
        style: "form",
        explode: true,
      },
    },
};

@Himenon
Copy link
Owner

Himenon commented Apr 4, 2023

Thanks.

you can update snapshot !

https://github.com/Himenon/openapi-typescript-code-generator#development

@Himenon Himenon self-requested a review April 4, 2023 09:59
@Thiry1
Copy link
Contributor Author

Thiry1 commented Apr 4, 2023

oops.I'll do it ASAP

@Thiry1
Copy link
Contributor Author

Thiry1 commented Apr 4, 2023

@Himenon PTAL

@Himenon Himenon merged commit d709d5f into Himenon:main Apr 4, 2023
@Himenon
Copy link
Owner

Himenon commented Apr 4, 2023

@Thiry1
Copy link
Contributor Author

Thiry1 commented Apr 4, 2023

Thanks for publish!

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.

None yet

2 participants