Extract OpenAPI schemas to separate file and move models to internal/model package
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Split api/openapi.yaml schemas into api/schemas.yaml so structs can be generated independently from the API server code. Models now generate into internal/model/ via oapi-codegen, with the server referencing them through import-mapping. Moved PtrTo helper to internal/utils and removed storage.ReportSummary in favor of model.TestSummary.
This commit is contained in:
parent
3eec5ce966
commit
396c51974a
47 changed files with 1878 additions and 1785 deletions
|
|
@ -1,5 +1,9 @@
|
|||
package: api
|
||||
package: model
|
||||
generate:
|
||||
models: true
|
||||
embedded-spec: false
|
||||
output: internal/api/models.gen.go
|
||||
embedded-spec: true
|
||||
output: internal/model/types.gen.go
|
||||
output-options:
|
||||
skip-prune: true
|
||||
import-mapping:
|
||||
./schemas.yaml: "-"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package: api
|
||||
generate:
|
||||
gin-server: true
|
||||
models: true
|
||||
embedded-spec: true
|
||||
output: internal/api/server.gen.go
|
||||
import-mapping:
|
||||
./schemas.yaml: git.happydns.org/happyDeliver/internal/model
|
||||
|
|
|
|||
1163
api/openapi.yaml
1163
api/openapi.yaml
File diff suppressed because it is too large
Load diff
1173
api/schemas.yaml
Normal file
1173
api/schemas.yaml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue