Skip to content

Commit

Permalink
Merge pull request #217 from Yashsharma1911/addOrg
Browse files Browse the repository at this point in the history
Added Open API schemas and struct for org
  • Loading branch information
Yashsharma1911 authored Jan 24, 2025
2 parents 4caefe7 + e83fb8b commit d438feb
Show file tree
Hide file tree
Showing 3 changed files with 392 additions and 3 deletions.
132 changes: 132 additions & 0 deletions models/v1beta1/organization.go

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

257 changes: 257 additions & 0 deletions schemas/constructs/openapi/organization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
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)
security:
- jwt: []
tags:
- name: organizations
description: Workspaces bring teams, environments, and designs together
components:
securitySchemes:
jwt:
type: http
scheme: Bearer
bearerFormat: JWT
schemas:
organizationWithRoles:
type: object
properties:
ID:
$ref: ./common/core.yml#/components/schemas/general_id
name:
$ref: ./common/core.yml#/components/schemas/text
description:
$ref: ./common/core.yml#/components/schemas/text
country:
$ref: ./common/core.yml#/components/schemas/text
region:
$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
metadata:
$ref: '#/components/schemas/organizationMetadata'
created_at:
$ref: ./common/core.yml#/components/schemas/time
updated_at:
$ref: ./common/core.yml#/components/schemas/time
deleted_at:
$ref: ./common/core.yml#/components/schemas/nullTime
role_names:
$ref: ./common/core.yml#/components/schemas/roleNames
availableOrganization:
type: object
properties:
ID:
$ref: ./common/core.yml#/components/schemas/general_id
name:
$ref: ./common/core.yml#/components/schemas/text
description:
$ref: ./common/core.yml#/components/schemas/text
country:
$ref: ./common/core.yml#/components/schemas/text
region:
$ref: ./common/core.yml#/components/schemas/text
owner:
$ref: ./common/core.yml#/components/schemas/text
description: UserID of user who created organization
metadata:
$ref: '#/components/schemas/organizationMetadata'
created_at:
$ref: ./common/core.yml#/components/schemas/time
updated_at:
$ref: ./common/core.yml#/components/schemas/time
deleted_at:
$ref: ./common/core.yml#/components/schemas/nullTime
organizationMetadata:
type: object
properties:
preferences:
$ref: '#/components/schemas/organizationPreferences'
organizationPreferences:
type: object
properties:
theme:
type: object
properties:
theme_id:
type: string
description: ID for the theme to load for the currently selected organization
logo:
type: object
properties:
desktop_view:
type: string
description: Contains the location of the custom desktop view SVG.
mobile_view:
type: string
description: Contains the location of the custom mobile view SVG.
dashboard:
type: object
properties:
layout:
additionalProperties:
type: object
organization:
properties:
ID:
$ref: ./common/core.yml#/components/schemas/general_id
name:
$ref: ./common/core.yml#/components/schemas/text
country:
$ref: ./common/core.yml#/components/schemas/text
region:
$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
metadata:
$ref: '#/components/schemas/organizationMetadata'
created_at:
$ref: ./common/core.yml#/components/schemas/time
updated_at:
$ref: ./common/core.yml#/components/schemas/time
deleted_at:
$ref: ./common/core.yml#/components/schemas/nullTime
required:
- name
organizationsPage:
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
organizations:
type: array
items:
$ref: '#/components/schemas/availableOrganization'
organizationPayload:
properties:
name:
$ref: ./common/core.yml#/components/schemas/text
country:
$ref: ./common/core.yml#/components/schemas/text
region:
$ref: ./common/core.yml#/components/schemas/text
description:
$ref: ./common/core.yml#/components/schemas/text
notify_org_update:
type: boolean
preferences:
$ref: '#/components/schemas/organizationPreferences'
teamsOrganizationsMapping:
properties:
ID:
$ref: ./common/core.yml#/components/schemas/general_id
org_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: org_id
json: org_id
x-go-type-skip-optional-pointer: true
team_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: team_id
json: team_id
x-go-type-skip-optional-pointer: true
created_at:
$ref: ./common/core.yml#/components/schemas/time
updated_at:
$ref: ./common/core.yml#/components/schemas/time
deleted_at:
$ref: ./common/core.yml#/components/schemas/nullTime
teamsOrganizationsMappingPage:
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
teams_organizations_mapping:
type: array
items:
$ref: '#/components/schemas/teamsOrganizationsMapping'
usersOrganizationsMapping:
properties:
ID:
$ref: ./common/core.yml#/components/schemas/general_id
user_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: user_id
json: user_id
x-go-type-skip-optional-pointer: true
organization_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: organization_id
json: organization_id
x-go-type-skip-optional-pointer: true
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
created_at:
$ref: ./common/core.yml#/components/schemas/time
updated_at:
$ref: ./common/core.yml#/components/schemas/time
deleted_at:
$ref: ./common/core.yml#/components/schemas/nullTime
requestBodies:
organizationPayload:
description: Body for creating organization
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/organizationPayload'
Loading

0 comments on commit d438feb

Please sign in to comment.