diff --git a/api/queryService/api.gen.go b/api/queryService/api.gen.go index 2dd32d38..da88e348 100644 --- a/api/queryService/api.gen.go +++ b/api/queryService/api.gen.go @@ -12,6 +12,7 @@ import ( "net/url" "path" "strings" + "time" "github.com/getkin/kin-openapi/openapi3" "github.com/labstack/echo/v4" @@ -19,6 +20,10 @@ import ( openapi_types "github.com/oapi-codegen/runtime/types" ) +const ( + PlaceholderAuthScopes = "placeholderAuth.Scopes" +) + // Defines values for ClientStatus. const ( INSYNC ClientStatus = "IN_SYNC" @@ -206,10 +211,10 @@ type ExportTrigger struct { // IngestionFilters Filter the scope based on ingestion parameters. IngestionFilters *struct { // EndDate The last date of ingestion. - EndDate *string `json:"end_date,omitempty"` + EndDate *time.Time `json:"end_date,omitempty"` // StartDate This first date of ingestion. - StartDate *string `json:"start_date,omitempty"` + StartDate *time.Time `json:"start_date,omitempty"` } `json:"ingestion_filters,omitempty"` } @@ -394,6 +399,8 @@ type ServerInterfaceWrapper struct { func (w *ServerInterfaceWrapper) CreateClient(ctx echo.Context) error { var err error + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.CreateClient(ctx) return err @@ -426,6 +433,8 @@ func (w *ServerInterfaceWrapper) UpdateClient(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.UpdateClient(ctx, id) return err @@ -442,6 +451,8 @@ func (w *ServerInterfaceWrapper) GetCollectorByClientId(ctx echo.Context) error return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetCollectorByClientId(ctx, id) return err @@ -458,6 +469,8 @@ func (w *ServerInterfaceWrapper) SetCollectorByClientId(ctx echo.Context) error return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.SetCollectorByClientId(ctx, id) return err @@ -474,6 +487,8 @@ func (w *ServerInterfaceWrapper) ListDocumentsByClientId(ctx echo.Context) error return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.ListDocumentsByClientId(ctx, id) return err @@ -490,6 +505,8 @@ func (w *ServerInterfaceWrapper) TriggerExport(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.TriggerExport(ctx, id) return err @@ -506,6 +523,8 @@ func (w *ServerInterfaceWrapper) GetStatusByClientId(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetStatusByClientId(ctx, id) return err @@ -522,6 +541,8 @@ func (w *ServerInterfaceWrapper) ExportState(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.ExportState(ctx, id) return err @@ -531,6 +552,8 @@ func (w *ServerInterfaceWrapper) ExportState(ctx echo.Context) error { func (w *ServerInterfaceWrapper) ListQueries(ctx echo.Context) error { var err error + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.ListQueries(ctx) return err @@ -540,6 +563,8 @@ func (w *ServerInterfaceWrapper) ListQueries(ctx echo.Context) error { func (w *ServerInterfaceWrapper) CreateQuery(ctx echo.Context) error { var err error + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.CreateQuery(ctx) return err @@ -556,6 +581,8 @@ func (w *ServerInterfaceWrapper) GetQuery(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetQuery(ctx, id) return err @@ -572,6 +599,8 @@ func (w *ServerInterfaceWrapper) UpdateQuery(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.UpdateQuery(ctx, id) return err @@ -588,6 +617,8 @@ func (w *ServerInterfaceWrapper) TestQuery(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } + ctx.Set(PlaceholderAuthScopes, []string{}) + // Invoke the callback with all the unmarshaled arguments err = w.Handler.TestQuery(ctx, id) return err @@ -641,54 +672,60 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/8xbWXPjNhL+KyjuPuqwRr7fHNtJaStrZ23PVrayLhUFNiUkFEEDoGa0U/rvW7h4AhKl", - "sZy82SbQ6P76RDf8LcB0mdEUUsGD629BFrJwCQKY+u02IZCKyZ38OQKOGckEoWlwHbwsAGH1FU3uBkEv", - "IPKvWSgWQS9IwyUE1wGJgl7A4C0nDKLgWrAcegHHC1iGkuDfGcTBdfC3YcnBUH/lw+LgzaYX3H/NKPNy", - "AerrUbgoDpZc/CsHtvYxMblDNEZiAehNLnt/VuzpG8kKA57RlIPS0SRdhQmJnuAtBy7a7JnviOkFaEaj", - "9UB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Wqq0iy9bvZbNsve5gNBj3zwajTHKtU06uyccceDGjYnMrxdWK", + "XQfEg2UU+MAuY3keSq/0tAOy45HaLyjQzGMRM0BU8qckAmLeCar+RVdvpBUwPzcv30+af4NNesLImsrf", + "qqiDhvPI4SO9nySuaP4mVepG75i3BC7MLcuBPVJPu3qCCkXqrn6X7yfyNWPNgDutTqur4mJrCMma4gvc", + "b3VafazIYamU1faSgPg6cpG4vpM5IiiEJ5uefqJCh83WLHqkPvjI19G/ln6taIEmfjLehN31SQAubLbe", + "i0JhlifrdUB1aK79C9c4OqS0yjgPSusu/Cn53L6Dl5UurWQq1iX1Ot0XltlUjzhk1u1GRB/x2POA83kc", + "BJsXKnUadDpVI5Jdtwv1UNsGHtYblq3gyp5TfPHJcUI/3W/vG5jHqxWRTwoDmhzmJPbJgsurxJRe6FOB", + "7+X0BsbtL9TfSvEWrrzCBxCMwqMCM9c3l2cRPdsgKripucsj+CcQGfjm8NB5MTykqalqMGTO2J/P/olt", + "fwKRHDmp9sn1DtPmyzc/uddNu2SyAfeK5DwH/WuXguuoLOUqh5rlNYm5SjrTg78BnRnHZw+dici4OzXI", + "q+Mgd71t6zG9MpbRKs7yf02GaXvZmp4DuCap9zF0k6s3LrOO7f7DxuDaPyUFpYVKLgpKRP9Ts9BB+DBM", + "lTVaYrAsWNKSjVPS1i0Iu3wq0n7Cuq3G0QmoK1u9sp+6ZqDCoM4Cpn1sNthVTidnfWVkdpsH6258FvnM", + "z0bN9/CZtFRg3pVpOH22yZakuwgtF53/NoyWTwjscKySbciNvQKwqLiAyOVDdLSkdBMm6nsRciviTmfF", + "1ePzK/gycn+pQQVVfl6mvGPNIskJZXCajL5O75+IHPO1AxXsaAQ17Kc03/qmD9M0DeiQ8E2ufOf1eYzG", + "eGlBR+akmJqUSo5NK3VqECzfhJ79ZqGWr2g+gvg2jmLxs4tqZjVbeF0+o/3kJLXhaV64EmEahrvjHldL", + "8H7VuPJixqxdVKw+V5qUR1VaZAWnRFO+erCadJaEoxlAiJLCrdcQCJOmy9WwtXZQzqFYSr8GVVh6sAn9", + "vS/aIF+DkK1KU4VgHqMCGCVuL9BWRZzY87PLOCB1WdzBa/H5HhLVWwypREIOQjXSADqNdHAWQFeMnMa7", + "yhYQHJMDeMjI9gfwtHR+53/h/6fEMBWATYjriNi/hvHu0H+K2RNRlanLqoLAawu3JTbJxdjKLHXQRZck", + "sQ/LCmRorkZS4OTstjsloIP4ttbWxtRs3j0pgzgiS6CB+NqTBAfxUFuYiqivwKnzHn6jqikVjekaqjjU", + "H6tVXcn5svtC1AO4ODlqsyViFdAt1IQdEvjonEJYU8blklbLyOPgNYQJ1W73I1/Nyx4txgvFNizyYy+p", + "Y1GlMzEL8AVeCrHmF+22H3m/bVpetGo/dhXyzTrFmd5Z7EoPLlBcJB049R7maUFO/oG9bdScxgbJszMV", + "A+d1J0vD6clcpThq3blSj93MlNN+3Vn0CzIzS/7puL3f/jcAAP//x4FEowZKAAA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/pkg/queryService/api.gen.go b/pkg/queryService/api.gen.go index bf8c0ac6..d88c069f 100644 --- a/pkg/queryService/api.gen.go +++ b/pkg/queryService/api.gen.go @@ -12,11 +12,16 @@ import ( "net/http" "net/url" "strings" + "time" "github.com/oapi-codegen/runtime" openapi_types "github.com/oapi-codegen/runtime/types" ) +const ( + PlaceholderAuthScopes = "placeholderAuth.Scopes" +) + // Defines values for ClientStatus. const ( INSYNC ClientStatus = "IN_SYNC" @@ -204,10 +209,10 @@ type ExportTrigger struct { // IngestionFilters Filter the scope based on ingestion parameters. IngestionFilters *struct { // EndDate The last date of ingestion. - EndDate *string `json:"end_date,omitempty"` + EndDate *time.Time `json:"end_date,omitempty"` // StartDate This first date of ingestion. - StartDate *string `json:"start_date,omitempty"` + StartDate *time.Time `json:"start_date,omitempty"` } `json:"ingestion_filters,omitempty"` } diff --git a/scripts/openapi-scripts.yml b/scripts/openapi-scripts.yml index 12ee4992..b93a9ab4 100644 --- a/scripts/openapi-scripts.yml +++ b/scripts/openapi-scripts.yml @@ -7,7 +7,7 @@ tasks: lint: cmds: - | - vacuum lint ./serviceAPIs/queryService.yaml -b -d -e --no-clip \ + vacuum lint ./serviceAPIs/queryService.yaml -b -d -e --no-clip -z \ {{.CLI_ARGS}} generate: - | diff --git a/serviceAPIs/queryService.yaml b/serviceAPIs/queryService.yaml index faee494d..727858fa 100644 --- a/serviceAPIs/queryService.yaml +++ b/serviceAPIs/queryService.yaml @@ -3,9 +3,9 @@ openapi: 3.0.3 info: title: Query Orchestration API description: API documentation for the Query Orchestration services. - version: 1.0.0 + version: 0.0.1 servers: - - url: https://api.example.com/v1 + - url: https://doczy.com/v1 description: Production server tags: - name: ClientService @@ -27,6 +27,8 @@ paths: - ClientService summary: Create a new client description: Creates a new client with the provided details. + security: + - placeholderAuth: [] requestBody: description: The details required to create a client required: true @@ -37,12 +39,17 @@ paths: responses: "201": description: Client created successfully. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/ClientIDBody" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /client/{id}: parameters: @@ -56,18 +63,25 @@ paths: responses: "200": description: Client details. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/DocClient" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" patch: operationId: updateClient tags: - ClientService summary: Update a client description: Updates an existing client with new details. + security: + - placeholderAuth: [] requestBody: description: The details to update required: true @@ -78,8 +92,13 @@ paths: responses: "200": description: Client updated successfully. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /query: get: @@ -88,21 +107,30 @@ paths: - QueryService summary: List queries description: Retrieves a list of queries based on filter criteria. + security: + - placeholderAuth: [] responses: "200": description: A list of queries. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/ListQueries" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" post: operationId: createQuery tags: - QueryService summary: Create a new query description: Creates a new query with the provided details. + security: + - placeholderAuth: [] requestBody: description: The details required to create a query required: true @@ -113,12 +141,17 @@ paths: responses: "201": description: Query created successfully. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/IdMessage" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /query/{id}: parameters: @@ -129,21 +162,30 @@ paths: - QueryService summary: Get a query by ID description: Retrieves a specific query by its ID. + security: + - placeholderAuth: [] responses: "200": description: Query details. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/Query" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" patch: operationId: updateQuery tags: - QueryService summary: Update a query description: Updates an existing query with new details. + security: + - placeholderAuth: [] requestBody: description: The update values for the desired query. required: true @@ -154,8 +196,13 @@ paths: responses: "200": description: Query updated successfully. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /query/{id}/test: parameters: @@ -166,6 +213,8 @@ paths: - QueryService summary: Test a query description: Executes a test run of a query with the provided parameters. + security: + - placeholderAuth: [] requestBody: description: The query test requirements. required: true @@ -176,12 +225,17 @@ paths: responses: "200": description: Test result. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/QueryTestResponse" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /client/{id}/status: parameters: @@ -192,15 +246,22 @@ paths: - ClientService summary: Get client sync status description: Retrieves the sync status by its client ID. + security: + - placeholderAuth: [] responses: "200": description: Client status details. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/ClientStatusBody" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /client/{id}/collector: parameters: @@ -211,21 +272,30 @@ paths: - CollectorService summary: Get a collector by client ID description: Retrieves a specific collector by its client ID. + security: + - placeholderAuth: [] responses: "200": description: Collector details. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/Collector" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" patch: operationId: setCollectorByClientId tags: - CollectorService summary: Set a collector description: Set client collector with new details. + security: + - placeholderAuth: [] requestBody: description: The details to be set for the collector. required: true @@ -236,8 +306,13 @@ paths: responses: "204": description: Collector set successfully. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /client/{id}/documents: parameters: @@ -248,15 +323,22 @@ paths: - DocumentsService summary: List the documents for a client description: Retrieves the list of documents by the client ID. + security: + - placeholderAuth: [] responses: "200": description: Client documents list. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/ListDocuments" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /client/{id}/export: parameters: @@ -267,6 +349,8 @@ paths: - ExportService summary: Trigger an export description: Initiates the export process. + security: + - placeholderAuth: [] requestBody: description: The export requirements. required: true @@ -277,12 +361,17 @@ paths: responses: "201": description: Export triggered successfully. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/IdMessage" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" /export/{id}: parameters: @@ -293,15 +382,22 @@ paths: - ExportService summary: Check export state. description: Checks the current state of an export. + security: + - placeholderAuth: [] responses: "200": description: Export has been completed. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" content: application/json: schema: $ref: "#/components/schemas/ExportDetails" "400": $ref: "#/components/responses/InvalidRequest" + "500": + $ref: "#/components/responses/InternalError" components: parameters: @@ -329,44 +425,77 @@ components: $ref: "#/components/schemas/QueryID" description: The ID of the query. + headers: + RateLimit: + schema: + type: string + pattern: "^[0-9]+;window=[0-9]+$" + maxLength: 32 + description: Rate limit information in format "limit;window=time-window" + example: "100;window=60" + + securitySchemes: + placeholderAuth: + type: apiKey + in: header + name: X-API-Key + description: "Placeholder security scheme for future implementation" + responses: InvalidRequest: description: Invalid request body. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" + + InternalError: + description: Internal server error. + headers: + RateLimit: + $ref: "#/components/headers/RateLimit" schemas: ClientID: type: string description: The client external id example: AAA + maxLength: 36 + pattern: "^.+$" ClientUID: type: string format: uuid description: The client internal unique id example: 0195853c-8fdd-77cd-b36c-255241bddd33 + maxLength: 36 QueryID: type: string format: uuid description: The query id. example: 019580df-ef65-7676-8de9-94435a93337a + maxLength: 36 DocumentID: type: string format: uuid description: The document id. example: 019580df-b3f8-7348-9ab1-1e55b3f18ed7 + maxLength: 36 ExportID: type: string format: uuid description: The export id. example: 019580de-4d51-713c-98ee-464e83811f13 + maxLength: 36 ClientName: type: string description: The client name example: AArete + maxLength: 256 + pattern: "^.+$" ClientCanSync: type: boolean @@ -382,6 +511,8 @@ components: QueryConfig: type: string description: Configuration for the query. + maxLength: 2048 + pattern: '^\{.+\}$' Query: description: A logic unit of execution. @@ -411,6 +542,7 @@ components: properties: queries: type: array + maxItems: 512 items: $ref: "#/components/schemas/Query" description: List of queries. @@ -432,6 +564,7 @@ components: RequiredQueryIDs: type: array + maxItems: 256 items: $ref: "#/components/schemas/QueryID" description: List of required query IDs. @@ -466,6 +599,8 @@ components: value: type: string description: Result of the query test. + pattern: "^.+$" + maxLength: 2048 required: - value @@ -516,6 +651,7 @@ components: ListDocuments: type: array description: The documents in the client. + maxItems: 256 items: $ref: "#/components/schemas/Document" @@ -528,9 +664,13 @@ components: bucket: type: string description: The bucket containing the document + maxLength: 256 + pattern: "^.+$" key: type: string description: The path to the document + maxLength: 2048 + pattern: "^.+/.+$" required: - id - bucket @@ -565,17 +705,22 @@ components: type: string format: uuid description: Unique identifier for entity. + maxLength: 36 required: - id CodeVersion: type: integer format: int64 + minimum: 1 + maximum: 9223372036854775808 description: The desired code version. Version: type: integer format: int32 + minimum: 0 + maximum: 2147483647 description: The desired version. Collector: @@ -604,6 +749,7 @@ components: CollectorFields: type: array + maxItems: 256 description: The fields in the collector. items: $ref: "#/components/schemas/CollectorField" @@ -623,6 +769,8 @@ components: CollectorFieldName: type: string + pattern: "^[a-zA-Z]+$" + maxLength: 256 description: The output field name. CollectorField: @@ -646,12 +794,17 @@ components: properties: start_date: type: string + format: date-time + maxLength: 32 description: This first date of ingestion. end_date: type: string + format: date-time + maxLength: 32 description: The last date of ingestion. field_filters: type: array + maxItems: 256 description: Filter the scope based on field output values. items: $ref: "#/components/schemas/FieldFilter" @@ -667,8 +820,11 @@ components: values: type: array description: The values useful to the filter. + maxItems: 100 items: type: string + pattern: "^.+$" + maxLength: 256 description: Filtering a column required: - field_name @@ -706,8 +862,9 @@ components: output_location: type: string description: The location in which the export zip file will be found. - example: | - s3://{bucket_name}/{external_client_id}/yyyymmdd/{export_id}.csv + example: s3://abc/AA/20250213/019587ac-073b-7098-8426-bad970f8c974.csv + maxLength: 2048 + pattern: '^s3://.+/.+/[0-9]{8}/.+\.csv$' description: Payload for export trigger response. required: - client_id