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

fix(license_patch): Fix bug in license patch request #50

Merged
merged 1 commit into from
May 3, 2024
Merged
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
168 changes: 64 additions & 104 deletions cmd/laas/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.LicenseInput"
"$ref": "#/definitions/models.LicensePOSTRequestJSONSchema"
}
}
],
Expand Down Expand Up @@ -495,7 +495,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.LicenseUpdate"
"$ref": "#/definitions/models.LicensePATCHRequestJSONSchema"
}
}
],
Expand Down Expand Up @@ -1437,9 +1437,6 @@ const docTemplate = `{
},
"models.LicenseDB": {
"type": "object",
"required": [
"rf_shortname"
],
"properties": {
"external_ref": {
"$ref": "#/definitions/datatypes.JSONType-models_LicenseDBSchemaExtension"
Expand Down Expand Up @@ -1544,8 +1541,57 @@ const docTemplate = `{
}
}
},
"models.LicenseInput": {
"models.LicenseMapShortnamesElement": {
"type": "object",
"properties": {
"add": {
"type": "boolean",
"example": true
},
"shortname": {
"type": "string",
"example": "GPL-2.0-only"
}
}
},
"models.LicenseMapShortnamesInput": {
"type": "object",
"properties": {
"map": {
"type": "array",
"items": {
"$ref": "#/definitions/models.LicenseMapShortnamesElement"
}
}
}
},
"models.LicensePATCHRequestJSONSchema": {
"type": "object"
},
"models.LicensePOSTRequestJSONSchema": {
"type": "object",
"required": [
"external_ref",
"marydone",
"rf_FSFfree",
"rf_Fedora",
"rf_GPLv2compatible",
"rf_GPLv3compatible",
"rf_OSIapproved",
"rf_active",
"rf_copyleft",
"rf_detector_type",
"rf_flag",
"rf_fullname",
"rf_notes",
"rf_risk",
"rf_shortname",
"rf_source",
"rf_spdx_id",
"rf_text",
"rf_text_updatable",
"rf_url"
],
"properties": {
"external_ref": {
"$ref": "#/definitions/datatypes.JSONType-models_LicenseDBSchemaExtension"
Expand All @@ -1571,10 +1617,6 @@ const docTemplate = `{
"rf_active": {
"type": "boolean"
},
"rf_add_date": {
"type": "string",
"example": "2023-12-01T18:10:25.00+05:30"
},
"rf_copyleft": {
"type": "boolean"
},
Expand Down Expand Up @@ -1621,30 +1663,6 @@ const docTemplate = `{
}
}
},
"models.LicenseMapShortnamesElement": {
"type": "object",
"properties": {
"add": {
"type": "boolean",
"example": true
},
"shortname": {
"type": "string",
"example": "GPL-2.0-only"
}
}
},
"models.LicenseMapShortnamesInput": {
"type": "object",
"properties": {
"map": {
"type": "array",
"items": {
"$ref": "#/definitions/models.LicenseMapShortnamesElement"
}
}
}
},
"models.LicenseResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1678,76 +1696,6 @@ const docTemplate = `{
}
}
},
"models.LicenseUpdate": {
"type": "object",
"properties": {
"marydone": {
"type": "boolean"
},
"rf_FSFfree": {
"type": "boolean"
},
"rf_Fedora": {
"type": "string"
},
"rf_GPLv2compatible": {
"type": "boolean"
},
"rf_GPLv3compatible": {
"type": "boolean"
},
"rf_OSIapproved": {
"type": "boolean"
},
"rf_active": {
"type": "boolean"
},
"rf_add_date": {
"type": "string",
"example": "2023-12-01T18:10:25.00+05:30"
},
"rf_copyleft": {
"type": "boolean"
},
"rf_detector_type": {
"type": "integer",
"example": 1
},
"rf_flag": {
"type": "integer",
"example": 1
},
"rf_fullname": {
"type": "string",
"example": "MIT License"
},
"rf_notes": {
"type": "string",
"example": "This license has been superseded."
},
"rf_risk": {
"type": "integer"
},
"rf_source": {
"type": "string"
},
"rf_spdx_id": {
"type": "string",
"example": "MIT"
},
"rf_text": {
"type": "string",
"example": "MIT License Text here"
},
"rf_text_updatable": {
"type": "boolean"
},
"rf_url": {
"type": "string",
"example": "https://opensource.org/licenses/MIT"
}
}
},
"models.Obligation": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1981,6 +1929,18 @@ const docTemplate = `{
}
}
},
"models.OptionalData-string": {
"type": "object",
"properties": {
"isDefined": {
"description": "This is set to true if corresponding key is present in json object",
"type": "boolean"
},
"value": {
"type": "string"
}
}
},
"models.PaginationMeta": {
"type": "object",
"properties": {
Expand Down
Loading
Loading