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

feat: added user json as createdBy field in getLicense #89

Open
wants to merge 2 commits into
base: main
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
169 changes: 8 additions & 161 deletions cmd/laas/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,75 +683,6 @@ const docTemplate = `{
}
}
}
},
"patch": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Update a license in the service",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Licenses"
],
"summary": "Update a license",
"operationId": "UpdateLicense",
"parameters": [
{
"type": "string",
"description": "Shortname of the license to be updated",
"name": "shortname",
"in": "path",
"required": true
},
{
"description": "Update license body (requires only the fields to be updated)",
"name": "license",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.LicenseUpdateJSONSchema"
}
}
],
"responses": {
"200": {
"description": "License updated successfully",
"schema": {
"$ref": "#/definitions/models.LicenseResponse"
}
},
"400": {
"description": "Invalid license body",
"schema": {
"$ref": "#/definitions/models.LicenseError"
}
},
"404": {
"description": "License with shortname not found",
"schema": {
"$ref": "#/definitions/models.LicenseError"
}
},
"409": {
"description": "License with same shortname already exists",
"schema": {
"$ref": "#/definitions/models.LicenseError"
}
},
"500": {
"description": "Failed to update license",
"schema": {
"$ref": "#/definitions/models.LicenseError"
}
}
}
}
},
"/login": {
Expand Down Expand Up @@ -1926,6 +1857,14 @@ const docTemplate = `{
"url": {
"type": "string",
"example": "https://opensource.org/licenses/MIT"
},
"user": {
"description": "Reference to User",
"allOf": [
{
"$ref": "#/definitions/models.User"
}
]
}
}
},
Expand Down Expand Up @@ -2055,98 +1994,6 @@ const docTemplate = `{
}
}
},
"models.LicenseUpdateJSONSchema": {
"type": "object",
"properties": {
"FSFfree": {
"type": "boolean",
"example": false
},
"Fedora": {
"type": "string",
"example": "Fedora"
},
"GPLv2compatible": {
"type": "boolean",
"example": false
},
"GPLv3compatible": {
"type": "boolean",
"example": false
},
"OSIapproved": {
"type": "boolean",
"example": false
},
"active": {
"type": "boolean",
"example": true
},
"copyleft": {
"type": "boolean",
"example": false
},
"detector_type": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"example": 1
},
"external_ref": {
"$ref": "#/definitions/datatypes.JSONType-models_LicenseDBSchemaExtension"
},
"flag": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"example": 1
},
"fullname": {
"type": "string",
"example": "MIT License"
},
"marydone": {
"type": "boolean",
"example": false
},
"notes": {
"type": "string",
"example": "This license has been superseded."
},
"obligations": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Obligation"
}
},
"risk": {
"type": "integer",
"maximum": 5,
"minimum": 0,
"example": 1
},
"source": {
"type": "string",
"example": "Source"
},
"spdx_id": {
"type": "string",
"example": "MIT"
},
"text": {
"type": "string",
"example": "MIT License Text here"
},
"text_updatable": {
"type": "boolean",
"example": false
},
"url": {
"type": "string",
"example": "https://opensource.org/licenses/MIT"
}
}
},
"models.Obligation": {
"type": "object",
"properties": {
Expand Down
169 changes: 8 additions & 161 deletions cmd/laas/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -676,75 +676,6 @@
}
}
}
},
"patch": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Update a license in the service",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Licenses"
],
"summary": "Update a license",
"operationId": "UpdateLicense",
"parameters": [
{
"type": "string",
"description": "Shortname of the license to be updated",
"name": "shortname",
"in": "path",
"required": true
},
{
"description": "Update license body (requires only the fields to be updated)",
"name": "license",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.LicenseUpdateJSONSchema"
}
}
],
"responses": {
"200": {
"description": "License updated successfully",
"schema": {
"$ref": "#/definitions/models.LicenseResponse"
}
},
"400": {
"description": "Invalid license body",
"schema": {
"$ref": "#/definitions/models.LicenseError"
}
},
"404": {
"description": "License with shortname not found",
"schema": {
"$ref": "#/definitions/models.LicenseError"
}
},
"409": {
"description": "License with same shortname already exists",
"schema": {
"$ref": "#/definitions/models.LicenseError"
}
},
"500": {
"description": "Failed to update license",
"schema": {
"$ref": "#/definitions/models.LicenseError"
}
}
}
}
},
"/login": {
Expand Down Expand Up @@ -1919,6 +1850,14 @@
"url": {
"type": "string",
"example": "https://opensource.org/licenses/MIT"
},
"user": {
"description": "Reference to User",
"allOf": [
{
"$ref": "#/definitions/models.User"
}
]
}
}
},
Expand Down Expand Up @@ -2048,98 +1987,6 @@
}
}
},
"models.LicenseUpdateJSONSchema": {
"type": "object",
"properties": {
"FSFfree": {
"type": "boolean",
"example": false
},
"Fedora": {
"type": "string",
"example": "Fedora"
},
"GPLv2compatible": {
"type": "boolean",
"example": false
},
"GPLv3compatible": {
"type": "boolean",
"example": false
},
"OSIapproved": {
"type": "boolean",
"example": false
},
"active": {
"type": "boolean",
"example": true
},
"copyleft": {
"type": "boolean",
"example": false
},
"detector_type": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"example": 1
},
"external_ref": {
"$ref": "#/definitions/datatypes.JSONType-models_LicenseDBSchemaExtension"
},
"flag": {
"type": "integer",
"maximum": 2,
"minimum": 0,
"example": 1
},
"fullname": {
"type": "string",
"example": "MIT License"
},
"marydone": {
"type": "boolean",
"example": false
},
"notes": {
"type": "string",
"example": "This license has been superseded."
},
"obligations": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Obligation"
}
},
"risk": {
"type": "integer",
"maximum": 5,
"minimum": 0,
"example": 1
},
"source": {
"type": "string",
"example": "Source"
},
"spdx_id": {
"type": "string",
"example": "MIT"
},
"text": {
"type": "string",
"example": "MIT License Text here"
},
"text_updatable": {
"type": "boolean",
"example": false
},
"url": {
"type": "string",
"example": "https://opensource.org/licenses/MIT"
}
}
},
"models.Obligation": {
"type": "object",
"properties": {
Expand Down
Loading