Add endpoint for reading and updating site .env file (#564)

* feat(api): Add endpoint for reading site .env file

- Add GET /api/projects/{project}/servers/{server}/sites/{site}/env endpoint
- Add feature tests with SSH mocking

* added updating env

* fix coding style

* generate docs

---------

Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
This commit is contained in:
Dimitar Yanakiev
2025-04-05 20:59:57 +03:00
committed by GitHub
parent 2a670146d8
commit e98e974e20
31 changed files with 2404 additions and 1395 deletions

View File

@ -28,7 +28,7 @@ endpoints:
responses:
-
status: 200
content: '{"data":[{"id":3,"name":"Selina Wintheiser DDS","created_at":"2025-04-05T17:35:55.000000Z","updated_at":"2025-04-05T17:35:55.000000Z"},{"id":4,"name":"Shanna Deckow","created_at":"2025-04-05T17:35:55.000000Z","updated_at":"2025-04-05T17:35:55.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
content: '{"data":[{"id":3,"name":"Mr. Drake Nader","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"},{"id":4,"name":"Wilhelmine Jacobson","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}],"links":{"first":"\/?page=1","last":"\/?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"\/?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"\/","per_page":25,"to":2,"total":2}}'
headers: []
description: ''
custom: []
@ -36,7 +36,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer 1D5bhvV64c38gPfad6EkZea'
- 'Bearer fbPE6haeDZ8v1gV5ak463dc'
controller: null
method: null
route: null
@ -67,19 +67,19 @@ endpoints:
name: name
description: 'The name of the project.'
required: true
example: quibusdam
example: dignissimos
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: quibusdam
name: dignissimos
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"name":"Mr. Johathan Koch","created_at":"2025-04-05T17:35:55.000000Z","updated_at":"2025-04-05T17:35:55.000000Z"}'
content: '{"id":3,"name":"Pattie Cole","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
@ -87,7 +87,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer hVDkvZ3d84aE6cf1ebgaP65'
- 'Bearer 6ZkedcEfa5V6Dv4ab8P3g1h'
controller: null
method: null
route: null
@ -130,7 +130,7 @@ endpoints:
responses:
-
status: 200
content: '{"id":3,"name":"Jorge Schulist V","created_at":"2025-04-05T17:35:55.000000Z","updated_at":"2025-04-05T17:35:55.000000Z"}'
content: '{"id":3,"name":"Mr. Elias Bauch","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
@ -138,7 +138,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer h4c16VZ8D5vkged63aaEbfP'
- 'Bearer P6ka4Zaefgh8Ec3dV15v6bD'
controller: null
method: null
route: null
@ -180,19 +180,19 @@ endpoints:
name: name
description: 'The name of the project.'
required: true
example: enim
example: sunt
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: enim
name: sunt
fileParameters: []
responses:
-
status: 200
content: '{"id":3,"name":"Annie Windler","created_at":"2025-04-05T17:35:55.000000Z","updated_at":"2025-04-05T17:35:55.000000Z"}'
content: '{"id":3,"name":"Elfrieda Jakubowski","created_at":"2025-04-05T17:48:03.000000Z","updated_at":"2025-04-05T17:48:03.000000Z"}'
headers: []
description: ''
custom: []
@ -200,7 +200,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer b8c4k3aPdhZev6a1Df6EVg5'
- 'Bearer ecaDZkf5E4vgP1V86d6hb3a'
controller: null
method: null
route: null
@ -251,7 +251,7 @@ endpoints:
auth:
- headers
- Authorization
- 'Bearer bd6cva815EZek3hPfD4aV6g'
- 'Bearer h5gZ63DPVbcevE4faka86d1'
controller: null
method: null
route: null