Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0, Speakeay CLI 1.32.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed May 16, 2023
1 parent 42a6633 commit 751148b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 18 deletions.
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,12 @@ Based on:
- OpenAPI Doc 1.0 https://prod.speakeasyapi.dev/v1/apis/Structure/version/1.0.0/schema/download
- Speakeasy CLI 1.31.1 (2.27.0) https://github.com/speakeasy-api/speakeasy
### Releases
- [NPM v0.10.0] https://www.npmjs.com/package/structure-ac/v/0.10.0 - .
- [NPM v0.10.0] https://www.npmjs.com/package/structure-ac/v/0.10.0 - .

## 2023-05-16 00:36:22
### Changes
Based on:
- OpenAPI Doc 1.0 https://prod.speakeasyapi.dev/v1/apis/Structure/version/1.0.0/schema/download
- Speakeasy CLI 1.32.0 (2.28.0) https://github.com/speakeasy-api/speakeasy
### Releases
- [NPM v0.11.0] https://www.npmjs.com/package/structure-ac/v/0.11.0 - .
8 changes: 4 additions & 4 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ configVersion: 1.0.0
management:
docChecksum: e0bf2d205ca94a0d32bd91d6ea558d5b
docVersion: "1.0"
speakeasyVersion: 1.31.1
generationVersion: 2.27.0
speakeasyVersion: 1.32.0
generationVersion: 2.28.0
generation:
telemetryEnabled: false
sdkClassName: structure
singleTagPerOp: false
telemetryEnabled: false
typescript:
version: 0.10.0
version: 0.11.0
author: structure
maxMethodParams: 0
packageName: structure-ac
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "structure-ac",
"version": "0.10.0",
"version": "0.11.0",
"author": "structure",
"scripts": {
"prepare": "tsc --build"
Expand Down
8 changes: 4 additions & 4 deletions src/internal/utils/queryparams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import {ParamDecorator, parseParamDecorator, populateFromGlobals, valToString} from "./utils";
import {ParamDecorator, parseParamDecorator, populateFromGlobals, shouldQueryParamSerialize, valToString} from "./utils";

import {requestMetadataKey} from "./requestbody";

Expand Down Expand Up @@ -102,7 +102,7 @@ function noExplodeSerializer(params: Record<string, any>, delimiter = ","): stri
const query: string[] = [];

Object.entries(Object.assign({}, params)).forEach(([key, value]) => {
if (!value) return;
if (!shouldQueryParamSerialize(value)) return;
if (value !== Object(value))
query.push(`${key}=${encodeURIComponent(valToString(value))}`);
else if (Array.isArray(value)) {
Expand Down Expand Up @@ -141,7 +141,7 @@ function formSerializerExplode(params: Record<string, any>): string {
const query: string[] = [];

Object.entries(Object.assign({}, params)).forEach(([key, value]) => {
if (!value) return;
if (!shouldQueryParamSerialize(value)) return;
if (value !== Object(value))
query.push(`${key}=${encodeURIComponent(value)}`);
else if (Array.isArray(value)) {
Expand Down Expand Up @@ -184,7 +184,7 @@ function deepObjectSerializer(params: Record<string, any>): string {
const query: string[] = [];

Object.entries(Object.assign({}, params)).forEach(([key, value]) => {
if (!value) return;
if (!shouldQueryParamSerialize(value)) return;
if (value !== Object(value))
query.push(`${key}=${encodeURIComponent(value)}`);
else if (Array.isArray(value)) {
Expand Down
12 changes: 8 additions & 4 deletions src/internal/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

import "reflect-metadata";

import { getSimplePathParams, ppMetadataKey } from "./pathparams";
import {getSimplePathParams, ppMetadataKey} from "./pathparams";

import { plainToInstance } from "class-transformer";
import { RFCDate } from "../../sdk/types";
import { requestMetadataKey } from "./requestbody";
import {plainToInstance} from "class-transformer";
import {RFCDate} from "../../sdk/types";
import {requestMetadataKey} from "./requestbody";

export const SerializationMethodToContentType: Record<string, string> = {
json: "application/json",
Expand Down Expand Up @@ -396,3 +396,7 @@ export function valToString(value: any): string {

return value.toString();
}

export function shouldQueryParamSerialize(value: any): boolean {
return !(value === undefined || value === null || value === "")
}
4 changes: 2 additions & 2 deletions src/sdk/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class Structure {
public _securityClient: AxiosInstance;
public _serverURL: string;
private _language = "typescript";
private _sdkVersion = "0.10.0";
private _genVersion = "2.27.0";
private _sdkVersion = "0.11.0";
private _genVersion = "2.28.0";
private _globals: any;

constructor(props?: SDKProps) {
Expand Down

0 comments on commit 751148b

Please sign in to comment.