Releases: Himenon/openapi-parameter-formatter
Releases · Himenon/openapi-parameter-formatter
@himenon/[email protected]
What's Changed
New Contributors
Full Changelog: https://github.com/Himenon/openapi-parameter-formatter/compare/@himenon/[email protected]...@himenon/[email protected]
@himenon/[email protected]
What's Changed
Breaking Changes
- Need
"type": "module"
inpackage.json
Changes
Full Changelog: https://github.com/Himenon/openapi-parameter-formatter/compare/@himenon/[email protected]...@himenon/[email protected]
@himenon/[email protected]
@himenon/[email protected]
Features
New API
import { QueryParameter } from "@himenon/openapi-parameter-formatter";
// Return URLSearchParams Instance
const instance = QueryParameter.generateByURLSearchParams("color", {
value: {
R: 100,
G: 200,
B: 150,
},
style: "deepObject",
explode: true,
});
Bug Fixes
const queryString = QueryParameter.generate("color", {
value: ["blue", "black", "brown"],
style: "pipeDelimited",
explode: false,
});
queryString === "color=blue%7Cblack%7Cbrown"; // true
const queryString = QueryParameter.generate("color", {
value: {
R: 100,
G: 200,
B: 150,
},
style: "deepObject",
explode: true,
});
queryString === "color%5BR%5D=100&color%5BG%5D=200&color%5BB%5D=150"; // true
#
Include Query Parameter
const queryString = QueryParameter.generate("color", {
value: ["#blue", "#black", "#brown"],
style: "form",
explode: false,
});
queryString === "color=%23blue%2C%23black%2C%23brown"; // true
Changes
- feat: Serialize QueryParameter with URLSearchParams #12