Merged in feature/openapifixes (pull request #106)

OpenAPI Middleware & Fixes

* updates
This commit is contained in:
Michael McGuinness
2025-03-18 13:06:42 +00:00
parent 555b6d420b
commit 3dd0c718cd
56 changed files with 8577 additions and 122 deletions
+5 -6
View File
@@ -24,7 +24,6 @@ import (
"github.com/stretchr/testify/require"
"github.com/aws/aws-sdk-go-v2/service/sqs"
"github.com/go-playground/validator/v10"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
@@ -41,7 +40,7 @@ func TestCreateQuery(t *testing.T) {
cfg.DBPool = pool
cfg.DBQueries = repository.New(pool)
cons := queryapi.NewControllers(validator.New(), &queryapi.Services{
cons := queryapi.NewControllers(&queryapi.Services{
Query: query.New(cfg),
})
@@ -85,7 +84,7 @@ func TestListQueries(t *testing.T) {
cfg.DBPool = pool
cfg.DBQueries = repository.New(pool)
cons := queryapi.NewControllers(validator.New(), &queryapi.Services{
cons := queryapi.NewControllers(&queryapi.Services{
Query: query.New(cfg),
})
@@ -126,7 +125,7 @@ func TestGetQuery(t *testing.T) {
cfg.DBPool = pool
cfg.DBQueries = repository.New(pool)
cons := queryapi.NewControllers(validator.New(), &queryapi.Services{
cons := queryapi.NewControllers(&queryapi.Services{
Query: query.New(cfg),
})
@@ -172,7 +171,7 @@ func TestUpdateQuery(t *testing.T) {
cfg.QueueClient = mockSQS
cfg.QueryVersionSyncURL = "here"
cons := queryapi.NewControllers(validator.New(), &queryapi.Services{
cons := queryapi.NewControllers(&queryapi.Services{
QueryUpdate: queryupdate.New(cfg, &queryupdate.Services{
Query: query.New(cfg),
}),
@@ -230,7 +229,7 @@ func TestTestQuery(t *testing.T) {
docsvc := document.New(cfg)
col := collector.New(cfg)
que := query.New(cfg)
cons := queryapi.NewControllers(validator.New(), &queryapi.Services{
cons := queryapi.NewControllers(&queryapi.Services{
Collector: col,
Query: que,
QueryTest: querytest.New(cfg, &querytest.Services{