Skip to content

Commit

Permalink
feat: added user/createdBy when creating new license
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourav Bhowmik committed Nov 14, 2024
1 parent b80d684 commit 34415c4
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 441 deletions.
161 changes: 0 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 @@ -2063,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
161 changes: 0 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 @@ -2056,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

0 comments on commit 34415c4

Please sign in to comment.