Skip to content

Commit 13035fd

Browse files
zoo-github-actions-auth[bot]github-actions[bot]jessfraz
authored
Update api spec (#153)
* YOYO NEW API SPEC! * updates Signed-off-by: Jess Frazelle <[email protected]> --------- Signed-off-by: Jess Frazelle <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <[email protected]>
1 parent ad15951 commit 13035fd

File tree

7 files changed

+2029
-1334
lines changed

7 files changed

+2029
-1334
lines changed

cmd/generate.go

Lines changed: 0 additions & 1 deletion
This file was deleted.

cmd/types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,14 @@ func (data Data) generateExampleValue(name string, s *openapi3.SchemaRef, spec *
710710
return "", err
711711
}
712712

713+
if schema.Items.Ref != "" {
714+
t := fmt.Sprintf("[]kittycad.%s{%s}", typeName, items)
715+
if required {
716+
return t, nil
717+
}
718+
return fmt.Sprintf("&%s", t), nil
719+
}
720+
713721
t := fmt.Sprintf("[]%s{%s}", typeName, items)
714722
if required {
715723
return t, nil

examples_test.go

Lines changed: 91 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)