Skip to content

Commit

Permalink
修复allOf/oneOf/anyOf的schmea枚举不是ref时编译错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Val-istar-Guo committed Sep 4, 2024
1 parent 31a06c7 commit a4b1215
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-onions-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opendoc/sdk": patch
---

修复 allOf/oneOf/anyOf 的 schmea 枚举不是 ref 时编译错误的问题
12 changes: 3 additions & 9 deletions pkg/sdk/src/templates/openapi-core/operation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,15 @@ export function {{h__get-safe-operation-name pathname method operation}}<STATUS
{{~/with}}
{{~else if this.allOf}}
{{#each this.allOf}}
{{~#with (h__dereference this)}}
{{~> send this}}
{{~/with}}
{{~> send this}}
{{/each}}
{{~else if this.oneOf}}
{{#each this.oneOf}}
{{~#with (h__dereference this)}}
{{~> send this}}
{{~/with}}
{{~> send this}}
{{/each}}
{{~else if this.anyOf}}
{{#each this.anyOf}}
{{~#with (h__dereference this)}}
{{~> send this}}
{{~/with}}
{{~> send this}}
{{/each}}
{{~else}}
{{~> SchemaSend this}}
Expand Down

0 comments on commit a4b1215

Please sign in to comment.