Skip to content

Commit

Permalink
fix seed
Browse files Browse the repository at this point in the history
  • Loading branch information
dcb6 committed Oct 3, 2024
1 parent bdd7eed commit 1948fa4
Show file tree
Hide file tree
Showing 99 changed files with 1,261 additions and 831 deletions.
8 changes: 1 addition & 7 deletions generators/php/codegen/src/context/PhpAttributeMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,7 @@ export class PhpAttributeMapper {
});
}

public getUnionTypeParameters({
types,
isOptional = false
}: {
types: php.Type[];
isOptional?: boolean;
}): php.AstNode[] {
public getUnionTypeParameters({ types, isOptional }: { types: php.Type[]; isOptional?: boolean }): php.AstNode[] {
const typeAttributeArguments = types.map((type) => this.getTypeAttributeArgument(type));
// remove duplicates, such as "string" and "string" if enums and strings are both in the union
return uniqWith([...typeAttributeArguments, ...(isOptional ? [php.codeblock("'null'")] : [])], isEqual);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,7 @@ export class HttpEndpointGenerator extends AbstractEndpointGenerator {
arguments_: UnnamedArgument[];
types: php.Type[];
}): php.CodeBlock {
const unionTypeParameters = this.context.phpAttributeMapper.getUnionTypeParameters({
types,
isOptional: false
});
const unionTypeParameters = this.context.phpAttributeMapper.getUnionTypeParameters({ types });
// if deduping in getUnionTypeParameters results in one type, treat it like just that type
if (unionTypeParameters.length === 1) {
return this.decodeJsonResponse(types[0]);
Expand Down
9 changes: 8 additions & 1 deletion seed/csharp-model/server-sent-events/.gitignore

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

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

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

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

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

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

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

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

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

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

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

87 changes: 87 additions & 0 deletions seed/csharp-sdk/server-sent-events/README.md

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

41 changes: 41 additions & 0 deletions seed/csharp-sdk/server-sent-events/reference.md

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

Empty file.
Loading

0 comments on commit 1948fa4

Please sign in to comment.