diff --git a/cmd/server/pactasrv/portfolio.go b/cmd/server/pactasrv/portfolio.go index 09c55e6..cffc7fb 100644 --- a/cmd/server/pactasrv/portfolio.go +++ b/cmd/server/pactasrv/portfolio.go @@ -2,7 +2,6 @@ package pactasrv import ( "context" - "fmt" "github.com/RMI/pacta/blob" "github.com/RMI/pacta/oapierr" @@ -44,5 +43,5 @@ func (s *Server) ParsePortfolio(ctx context.Context, req api.ParsePortfolioReque // (GET /portfolios) func (s *Server) ListPortfolios(ctx context.Context, request api.ListPortfoliosRequestObject) (api.ListPortfoliosResponseObject, error) { - return nil, fmt.Errorf("not implemented") + return nil, oapierr.NotImplemented("not implemented") } diff --git a/cmd/server/pactasrv/upload.go b/cmd/server/pactasrv/upload.go index a1a9263..55335cd 100644 --- a/cmd/server/pactasrv/upload.go +++ b/cmd/server/pactasrv/upload.go @@ -2,24 +2,24 @@ package pactasrv import ( "context" - "fmt" + "github.com/RMI/pacta/oapierr" api "github.com/RMI/pacta/openapi/pacta" ) // Starts the process of uploading one or more portfolio files // (POST /portfolio-upload) func (s *Server) StartPortfolioUpload(ctx context.Context, request api.StartPortfolioUploadRequestObject) (api.StartPortfolioUploadResponseObject, error) { - return nil, fmt.Errorf("not implemented") + return nil, oapierr.NotImplemented("not implemented") } // Called after uploads of portfolios to cloud storage are complete. // (POST /portfolio-upload:complete) func (s *Server) CompletePortfolioUpload(ctx context.Context, request api.CompletePortfolioUploadRequestObject) (api.CompletePortfolioUploadResponseObject, error) { - return nil, fmt.Errorf("not implemented") + return nil, oapierr.NotImplemented("not implemented") } // (GET /incomplete-uploads) func (s *Server) ListIncompleteUploads(ctx context.Context, request api.ListIncompleteUploadsRequestObject) (api.ListIncompleteUploadsResponseObject, error) { - return nil, fmt.Errorf("not implemented") + return nil, oapierr.NotImplemented("not implemented") } diff --git a/openapi/pacta.yaml b/openapi/pacta.yaml index 7b90fca..0f08a94 100644 --- a/openapi/pacta.yaml +++ b/openapi/pacta.yaml @@ -989,37 +989,43 @@ components: description: The time at which the holdings are represented at IncompleteUpload: type: object + required: + - id + - name + - description + - createdAt + - adminDebugEnabled properties: - ID: + id: type: string # Assuming IncompleteUploadID is a string, otherwise define its structure description: Unique identifier for the incomplete upload - Name: + name: type: string description: Name of the upload - Description: + description: type: string description: Description of the upload - HoldingsDate: + holdingsDate: $ref: '#/components/schemas/HoldingsDate' - CreatedAt: + createdAt: type: string format: date-time description: The time when the upload was created - RanAt: + ranAt: type: string format: date-time description: The time when the upload process was run - CompletedAt: + completedAt: type: string format: date-time description: The time when the upload was completed - FailureCode: + failureCode: type: string description: Code describing the failure, if any - FailureMessage: + failureMessage: type: string description: Message describing the failure, if any - AdminDebugEnabled: + adminDebugEnabled: type: boolean description: Flag to indicate whether admin debug mode is enabled Portfolio: