Skip to content

Commit

Permalink
feat: add getter for service
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusbakunas committed Aug 6, 2021
1 parent ea4b8b6 commit 6aae8fc
Show file tree
Hide file tree
Showing 9 changed files with 821 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ api/openapi.yaml
api_cronjob.go
api_dataset.go
api_pool.go
api_service.go
client.go
configuration.go
docs/CompositeValue.md
Expand All @@ -14,6 +15,8 @@ docs/Dataset.md
docs/DatasetApi.md
docs/Pool.md
docs/PoolApi.md
docs/Service.md
docs/ServiceApi.md
git_push.sh
go.mod
go.sum
Expand All @@ -22,5 +25,6 @@ model_cron_job.go
model_cron_job_schedule.go
model_dataset.go
model_pool.go
model_service.go
response.go
utils.go
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Class | Method | HTTP request | Description
*CronjobApi* | [**GetCronJob**](docs/CronjobApi.md#getcronjob) | **Get** /cronjob/id/{id} |
*DatasetApi* | [**GetDataset**](docs/DatasetApi.md#getdataset) | **Get** /pool/dataset/id/{id} |
*PoolApi* | [**ListPools**](docs/PoolApi.md#listpools) | **Get** /pool |
*ServiceApi* | [**GetService**](docs/ServiceApi.md#getservice) | **Get** /service/id/{id} |


## Documentation For Models
Expand All @@ -90,6 +91,7 @@ Class | Method | HTTP request | Description
- [CronJobSchedule](docs/CronJobSchedule.md)
- [Dataset](docs/Dataset.md)
- [Pool](docs/Pool.md)
- [Service](docs/Service.md)


## Documentation For Authorization
Expand Down
79 changes: 79 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,59 @@ paths:
- bearerAuth: []
tags:
- cronjob
/service/id/{id}:
get:
operationId: getService
parameters:
- description: ID of the cronjob
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
- explode: true
in: query
name: limit
required: false
schema:
type: integer
style: form
- explode: true
in: query
name: offset
required: false
schema:
type: integer
style: form
- explode: true
in: query
name: count
required: false
schema:
type: boolean
style: form
- explode: true
in: query
name: sort
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/Service'
description: Service details
"401":
description: No authorization for this endpoint
security:
- bearerAuth: []
tags:
- service
components:
responses:
NotFound:
Expand Down Expand Up @@ -458,6 +511,32 @@ components:
- name
- path
type: object
Service:
example:
service: service
enable: true
id: 0
state: state
pids:
- pids
- pids
properties:
id:
type: integer
service:
type: string
enable:
type: boolean
state:
type: string
pids:
items:
type: string
type: array
required:
- id
- service
type: object
CronJob_schedule:
example:
dom: dom
Expand Down
165 changes: 165 additions & 0 deletions api_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 61 additions & 0 deletions cfg/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,49 @@ paths:
$ref: '#/components/schemas/CronJob'
'401':
$ref: '#/components/responses/Unauthorized'
/service/id/{id}:
get:
tags:
- service
operationId: getService
security:
- bearerAuth: [ ]
parameters:
- name: id
in: path
description: ID of the cronjob
required: true
schema:
type: integer
- name: limit
in: query
required: false
schema:
type: integer
- name: offset
in: query
required: false
schema:
type: integer
- name: count
in: query
required: false
schema:
type: boolean
- name: sort
in: query
required: false
schema:
type: string
responses:
'200':
description: 'Service details'
content:
application/json:
schema:
$ref: '#/components/schemas/Service'
'401':
$ref: '#/components/responses/Unauthorized'
components:
securitySchemes:
bearerAuth:
Expand Down Expand Up @@ -296,6 +339,24 @@ components:
type: boolean
encryptkey_path:
type: string
Service:
type: object
required:
- id
- service
properties:
id:
type: integer
service:
type: string
enable:
type: boolean
state:
type: string
pids:
type: array
items:
type: string
responses:
NotFound:
description: Endpoint not found
Expand Down
3 changes: 3 additions & 0 deletions client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6aae8fc

Please sign in to comment.