Skip to content

Commit ca6d715

Browse files
committed
refact in specs
1 parent c39a009 commit ca6d715

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+5807
-4569
lines changed

specs/application/core.yaml renamed to specs/application/create-app.yaml

Lines changed: 20 additions & 273 deletions
Original file line numberDiff line numberDiff line change
@@ -317,47 +317,46 @@ tags:
317317
paths:
318318
/orchestrator/core/v1beta1/application:
319319
post:
320-
tags:
321-
- Applications
322-
summary: Create a new application
323-
description: Creates a new application in the Devtron system with the provided configuration.
324-
operationId: createApplication
325-
security:
326-
- bearerAuth: []
320+
description: Creates a new app for the configurations provided. The input json object is the same we get in response of GET method for fetching all details of an app
321+
operationId: CreateApp
327322
requestBody:
328-
description: Application creation request
323+
description: A JSON object containing the app configuration
329324
required: true
330325
content:
331326
application/json:
332327
schema:
333328
$ref: '#/components/schemas/CreateAppRequest'
334329
responses:
335330
'200':
336-
description: Application created successfully
331+
description: Successfully created the application
337332
content:
338333
application/json:
339334
schema:
340-
$ref: '#/components/schemas/ApiResponse'
335+
type: object
336+
properties:
337+
code:
338+
type: integer
339+
description: HTTP status code
340+
status:
341+
type: string
342+
description: Status message
343+
result:
344+
type: string
345+
description: Success message
341346
'400':
342-
description: Invalid request format or missing required fields
343-
content:
344-
application/json:
345-
schema:
346-
$ref: '#/components/schemas/ApiError'
347-
'401':
348-
description: Unauthorized
347+
description: Bad Request. Validation error/wrong request body.
349348
content:
350349
application/json:
351350
schema:
352351
$ref: '#/components/schemas/ApiError'
353-
'409':
354-
description: Application with the same name already exists
352+
'500':
353+
description: Internal Server Error
355354
content:
356355
application/json:
357356
schema:
358357
$ref: '#/components/schemas/ApiError'
359-
'500':
360-
description: Internal server error
358+
'403':
359+
description: Unauthorized User
361360
content:
362361
application/json:
363362
schema:
@@ -613,255 +612,3 @@ paths:
613612
application/json:
614613
schema:
615614
$ref: '#/components/schemas/ErrorResponse'
616-
617-
/orchestrator/app/autocomplete:
618-
get:
619-
tags:
620-
- Applications
621-
summary: List application autocomplete
622-
description: list of namespaces group by clusters
623-
operationId: listAppAutocomplete
624-
parameters:
625-
- name: token
626-
in: header
627-
required: true
628-
description: Authentication token.
629-
schema:
630-
type: string
631-
- in: query
632-
name: appName
633-
example: "abc"
634-
description: app name, wildcard query
635-
required: false
636-
allowEmptyValue: true
637-
schema:
638-
type: string
639-
- in: query
640-
name: teamId
641-
example: 1
642-
description: project id
643-
required: false
644-
allowEmptyValue: false
645-
schema:
646-
type: integer
647-
responses:
648-
'200':
649-
description: list response
650-
content:
651-
application/json:
652-
schema:
653-
type: object
654-
properties:
655-
code:
656-
type: integer
657-
description: status code
658-
status:
659-
type: string
660-
description: status
661-
result:
662-
type: array
663-
description: app list
664-
items:
665-
type: object
666-
'400':
667-
description: Bad request
668-
content:
669-
application/json:
670-
schema:
671-
$ref: '#/components/schemas/ErrorResponse'
672-
'401':
673-
description: Unauthorized
674-
content:
675-
application/json:
676-
schema:
677-
$ref: '#/components/schemas/ErrorResponse'
678-
'500':
679-
description: Internal server error
680-
content:
681-
application/json:
682-
schema:
683-
$ref: '#/components/schemas/ErrorResponse'
684-
security: []
685-
686-
/orchestrator/app/workflow:
687-
post:
688-
tags:
689-
- Workflow Management
690-
summary: Create an application workflow
691-
description: Creates a new workflow for a given application.
692-
operationId: CreateAppWorkflow
693-
parameters:
694-
- name: token
695-
in: header
696-
required: true
697-
description: Authentication token.
698-
schema:
699-
type: string
700-
requestBody:
701-
required: true
702-
content:
703-
application/json:
704-
schema:
705-
$ref: '#/components/schemas/AppWorkflowDto'
706-
responses:
707-
'200':
708-
description: Successfully created workflow.
709-
content:
710-
application/json:
711-
schema:
712-
$ref: '#/components/schemas/AppWorkflowDto'
713-
'400':
714-
description: Bad Request. Validation error or wrong request body.
715-
content:
716-
application/json:
717-
schema:
718-
$ref: '#/components/schemas/ErrorResponse'
719-
'401':
720-
description: Unauthorized User.
721-
content:
722-
application/json:
723-
schema:
724-
$ref: '#/components/schemas/ErrorResponse'
725-
'403':
726-
description: Forbidden.
727-
content:
728-
application/json:
729-
schema:
730-
$ref: '#/components/schemas/ErrorResponse'
731-
'500':
732-
description: Internal server error
733-
content:
734-
application/json:
735-
schema:
736-
$ref: '#/components/schemas/ErrorResponse'
737-
security: []
738-
739-
/orchestrator/app/workflow/clone:
740-
post:
741-
tags:
742-
- Clone Workflow
743-
summary: Clone Application Workflow
744-
description: Clone an existing application workflow.
745-
operationId: CloneAppWorkflow
746-
parameters:
747-
- name: token
748-
in: header
749-
required: true
750-
description: Authentication token.
751-
schema:
752-
type: string
753-
requestBody:
754-
required: true
755-
content:
756-
application/json:
757-
schema:
758-
type: object
759-
properties:
760-
sourceAppId:
761-
type: integer
762-
description: Source application ID to clone from
763-
targetAppId:
764-
type: integer
765-
description: Target application ID to clone to
766-
workflowName:
767-
type: string
768-
description: Name for the cloned workflow
769-
responses:
770-
'200':
771-
description: Successfully cloned workflow.
772-
content:
773-
application/json:
774-
schema:
775-
$ref: '#/components/schemas/AppWorkflowDto'
776-
'400':
777-
description: Bad Request.
778-
content:
779-
application/json:
780-
schema:
781-
$ref: '#/components/schemas/ErrorResponse'
782-
'401':
783-
description: Unauthorized.
784-
content:
785-
application/json:
786-
schema:
787-
$ref: '#/components/schemas/ErrorResponse'
788-
'404':
789-
description: Source workflow not found.
790-
content:
791-
application/json:
792-
schema:
793-
$ref: '#/components/schemas/ErrorResponse'
794-
'500':
795-
description: Internal server error
796-
content:
797-
application/json:
798-
schema:
799-
$ref: '#/components/schemas/ErrorResponse'
800-
security: []
801-
802-
/orchestrator/app/workflow/{app-wf-id}/app/{app-id}:
803-
delete:
804-
tags:
805-
- Workflow Management
806-
summary: Delete an application workflow
807-
description: Delete an application workflow by workflow ID and app ID.
808-
operationId: DeleteAppWorkflow
809-
parameters:
810-
- name: token
811-
in: header
812-
required: true
813-
description: Authentication token.
814-
schema:
815-
type: string
816-
- name: app-wf-id
817-
in: path
818-
required: true
819-
description: Application workflow ID
820-
schema:
821-
type: integer
822-
- name: app-id
823-
in: path
824-
required: true
825-
description: Application ID
826-
schema:
827-
type: integer
828-
responses:
829-
'200':
830-
description: Successfully deleted workflow.
831-
content:
832-
application/json:
833-
schema:
834-
type: object
835-
properties:
836-
success:
837-
type: boolean
838-
description: Deletion success status
839-
message:
840-
type: string
841-
description: Success message
842-
'400':
843-
description: Bad Request.
844-
content:
845-
application/json:
846-
schema:
847-
$ref: '#/components/schemas/ErrorResponse'
848-
'401':
849-
description: Unauthorized.
850-
content:
851-
application/json:
852-
schema:
853-
$ref: '#/components/schemas/ErrorResponse'
854-
'404':
855-
description: Workflow not found.
856-
content:
857-
application/json:
858-
schema:
859-
$ref: '#/components/schemas/ErrorResponse'
860-
'500':
861-
description: Internal server error
862-
content:
863-
application/json:
864-
schema:
865-
$ref: '#/components/schemas/ErrorResponse'
866-
security: []
867-

0 commit comments

Comments
 (0)