Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Keychains and Keys schema #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions models/v1beta1/keychains.go

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

55 changes: 55 additions & 0 deletions models/v1beta1/keys.go

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

148 changes: 148 additions & 0 deletions schemas/constructs/openapi/keychains.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
openapi: 3.0.0
info:
title: Meshery Cloud
description: Documentation for meshery Cloud REST APIs
contact:
email: [email protected]
version: v0.6.394
servers:
- url: https://meshery.layer5.io
description: Meshery Cloud production server URL
- url: https://staging-meshery.layer5.io
description: Meshery Cloud staging server URL
- url: http://localhost:9876
description: Meshery Cloud development server URL (controlled via PORT environment variable)
tags:
- name: keychains
description: APIs for keychains
security:
- jwt: []
components:
securitySchemes:
jwt:
type: http
scheme: Bearer
bearerFormat: JWT

schemas:
keychain:
properties:
ID:
type: string
format: uuid
x-go-type: uuid.UUID
x-go-type-import:
path: github.com/gofrs/uuid
x-oapi-codegen-extra-tags:
db: id
json: id
x-go-type-skip-optional-pointer: true
name:
type: string
format: string
x-oapi-codegen-extra-tags:
db: name
json: name
x-go-type-skip-optional-pointer: true
owner:
type: string
format: uuid
x-go-type: uuid.UUID
x-go-type-import:
path: github.com/gofrs/uuid
x-oapi-codegen-extra-tags:
db: owner
json: owner
x-go-type-skip-optional-pointer: true
created_at:
$ref: ./common/core.yml#/components/schemas/created_at
updated_at:
$ref: ./common/core.yml#/components/schemas/updated_at
deleted_at:
type: string
format: date-time
x-go-type: sql.NullTime
x-go-name: DeletedAt
x-oapi-codegen-extra-tags:
db: deleted_at
json: deleted_at
x-go-type-skip-optional-pointer: true

keychainsPage:
properties:
page:
$ref: ./common/core.yml#/components/schemas/number
page_size:
$ref: ./common/core.yml#/components/schemas/number
total_count:
$ref: ./common/core.yml#/components/schemas/number
keychains:
type: array
x-go-type-skip-optional-pointer: true
items:
$ref: "#/components/schemas/keychain"

keychainsKeysMapping:
properties:
id:
$ref: ./common/core.yml#/components/schemas/general_id
keychain_id:
type: string
format: uuid
x-go-type: uuid.UUID
x-go-type-import:
path: github.com/gofrs/uuid
x-oapi-codegen-extra-tags:
db: keychain_id
json: keychain_id
x-go-type-skip-optional-pointer: true
key_id:
type: string
format: uuid
x-go-type: uuid.UUID
x-go-type-import:
path: github.com/gofrs/uuid
x-oapi-codegen-extra-tags:
db: key_id
json: key_id
x-go-type-skip-optional-pointer: true
created_at:
$ref: ./common/core.yml#/components/schemas/created_at
updated_at:
$ref: ./common/core.yml#/components/schemas/updated_at
deleted_at:
type: string
format: date-time
x-go-type: sql.NullTime
x-go-name: DeletedAt
x-oapi-codegen-extra-tags:
db: deleted_at
json: deleted_at
x-go-type-skip-optional-pointer: true

keychainsKeysMappingPage:
properties:
page:
$ref: ./common/core.yml#/components/schemas/number
page_size:
$ref: ./common/core.yml#/components/schemas/number
total_count:
$ref: ./common/core.yml#/components/schemas/number
keychains_keys_mappings:
type: array
x-go-type-skip-optional-pointer: true
items:
$ref: "#/components/schemas/keychainsKeysMapping"

keychainFilter:
properties:
role_id:
type: string
format: uuid
x-go-type: uuid.UUID
x-go-type-import:
path: github.com/gofrs/uuid
x-oapi-codegen-extra-tags:
db: role_id
json: role_id
x-go-type-skip-optional-pointer: true
105 changes: 105 additions & 0 deletions schemas/constructs/openapi/keys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
openapi: 3.0.0
info:
title: Meshery Cloud
description: Documentation for meshery Cloud REST APIs
contact:
email: [email protected]
version: v0.6.394
servers:
- url: https://meshery.layer5.io
description: Meshery Cloud production server URL
- url: https://staging-meshery.layer5.io
description: Meshery Cloud staging server URL
- url: http://localhost:9876
description: Meshery Cloud development server URL (controlled via PORT environment variable)
tags:
- name: keys
description: APIs for keys
security:
- jwt: []
components:
securitySchemes:
jwt:
type: http
scheme: Bearer
bearerFormat: JWT

schemas:
keysPage:
properties:
page:
$ref: ./common/core.yml#/components/schemas/number
page_size:
$ref: ./common/core.yml#/components/schemas/number
total_count:
$ref: ./common/core.yml#/components/schemas/number
keys:
type: array
x-go-type-skip-optional-pointer: true
items:
$ref: "#/components/schemas/key"

key:
properties:
id:
$ref: ./common/core.yml#/components/schemas/general_id
subcategory:
$ref: ./common/core.yml#/components/schemas/text
function:
$ref: ./common/core.yml#/components/schemas/text
category:
type: string
format: string
x-oapi-codegen-extra-tags:
db: category
json: category
x-go-type-skip-optional-pointer: true
description:
$ref: ./common/core.yml#/components/schemas/text
owner:
type: string
format: uuid
x-go-type: uuid.UUID
x-go-type-import:
path: github.com/gofrs/uuid
x-oapi-codegen-extra-tags:
db: owner
json: owner
x-go-type-skip-optional-pointer: true
created_at:
$ref: ./common/core.yml#/components/schemas/created_at
updated_at:
$ref: ./common/core.yml#/components/schemas/updated_at
deleted_at:
type: string
format: date-time
x-go-type: sql.NullTime
x-go-name: DeletedAt
x-oapi-codegen-extra-tags:
db: deleted_at
json: deleted_at
x-go-type-skip-optional-pointer: true
paths:
/api/auth/keys:
get:
tags:
- keys
summary: Get all keys
operationId: GetKeys
description: Lists the keys available
parameters:
- $ref: ./common/parameters.yml#/components/parameters/page
- $ref: ./common/parameters.yml#/components/parameters/page_size
- $ref: ./common/parameters.yml#/components/parameters/search
- $ref: ./common/parameters.yml#/components/parameters/order
responses:
'200':
description: Keys
content:
application/json:
schema:
$ref: "#/components/schemas/keysPage"
'401':
- $ref: ./common/responses.yml#/401
'500':
- $ref: ./common/responses.yml#/500
Loading