Skip to content

Commit

Permalink
Merge pull request #50 from siemens/license_data_type_fix
Browse files Browse the repository at this point in the history
fix(license_patch): Fix bug in license patch request

Reviewed-by: mishra.gaurav@siemens.com, opensource@avinal.space
  • Loading branch information
GMishx committed May 3, 2024
2 parents c5a1a8c + 29e20be commit 90acd1a
Show file tree
Hide file tree
Showing 5 changed files with 596 additions and 592 deletions.
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

0 comments on commit 90acd1a

Please sign in to comment.