Skip to content

Commit d85d6f5

Browse files
committed
chore(golang): update endpoints.yaml to make ID field to be an integer
This unbreaks some of our tests. Part of #9
1 parent e6e1ee3 commit d85d6f5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

examples/go/routes.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type CounterDto struct {
1414
}
1515

1616
type CategoryDto struct {
17-
Id *string `json:"id" db:"id"`
17+
Id *int `json:"id" db:"id"`
1818
Name *string `json:"name" db:"name"`
1919
NameRu *string `json:"name_ru" db:"name_ru"`
2020
Slug *string `json:"slug" db:"slug"`
@@ -28,7 +28,7 @@ type CreateCategoryDto struct {
2828
}
2929

3030
type CategoryInfoDto struct {
31-
Id *string `json:"id" db:"id"`
31+
Id *int `json:"id" db:"id"`
3232
Name *string `json:"name" db:"name"`
3333
NameRu *string `json:"name_ru" db:"name_ru"`
3434
Slug *string `json:"slug" db:"slug"`

examples/js/endpoints.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
FROM categories
3131
dto:
3232
name: CategoryDto
33+
fields:
34+
id:
35+
type: integer
3336
post:
3437
query: >-
3538
INSERT
@@ -65,6 +68,9 @@
6568
WHERE id = :p.categoryId
6669
dto:
6770
name: CategoryInfoDto
71+
fields:
72+
id:
73+
type: integer
6874
put:
6975
query: >-
7076
UPDATE categories

0 commit comments

Comments
 (0)