Skip to content
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.41.0] - 2026-04-20
### Added
- Added `info_message` and `info_code` fields to all Cryptography response messages (`AlgorithmResponse.Purls`, `ComponentAlgorithms`, `AlgorithmsInRangeResponse.Purl`, `ComponentsAlgorithmsInRangeResponse.Component`, `ComponentAlgorithmsInRangeResponse.Component`, `VersionsInRangeResponse.Purl`, `ComponentsVersionsInRangeResponse.Component`, `ComponentVersionsInRangeResponse.Component`, `ComponentHints`, `HintsResponse.Purls`, `HintsInRangeResponse.Purl`, `ComponentsHintsInRangeResponse.Component`, `ComponentHintsInRangeResponse.Component`)
### Removed
- **Breaking change:** Removed `error_message` and `error_code` fields from all Cryptography response messages. Clients must migrate to `info_message`/`info_code`
### Changed
- Cleaned up `info_message`/`info_code` field descriptions across Vulnerability, Dependency, License and Cryptography protos, swagger definitions and generated Go code; removed per-service breaking-change blockquotes from their READMEs (history kept in this changelog)


## [0.40.0] - 2026-04-17
### Added
Expand Down Expand Up @@ -299,6 +307,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Vulnerabilities
- Added REST endpoint support for each service also

[0.41.0]: https://github.com/scanoss/papi/compare/v0.40.0...v0.41.0
[0.40.0]: https://github.com/scanoss/papi/compare/v0.39.0...v0.40.0
[0.39.0]: https://github.com/scanoss/papi/compare/v0.38.0...v0.39.0
[0.38.0]: https://github.com/scanoss/papi/compare/v0.37.0...v0.38.0
Expand Down
749 changes: 417 additions & 332 deletions api/cryptographyv2/scanoss-cryptography.pb.go

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions api/dependenciesv2/scanoss-dependencies.pb.go

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

2 changes: 0 additions & 2 deletions api/licensesv2/scanoss-licenses.pb.go

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

4 changes: 0 additions & 4 deletions api/vulnerabilitiesv2/scanoss-vulnerabilities.pb.go

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

43 changes: 23 additions & 20 deletions protobuf/scanoss/api/cryptography/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ curl -X GET 'https://api.scanoss.com/v2/cryptography/algorithms/component?purl=p
"version": "",
"requirement": ">=1.0.0",
"algorithms": [],
"error_message": "Component not found in database",
"error_code": "COMPONENT_NOT_FOUND"
"info_message": "Component not found in database",
"info_code": "COMPONENT_NOT_FOUND"
},
"status": {
"status": "SUCCESS",
Expand All @@ -68,8 +68,8 @@ curl -X GET 'https://api.scanoss.com/v2/cryptography/algorithms/component?purl=p
"version": "",
"requirement": ">=1.0.0",
"algorithms": [],
"error_message": "Invalid PURL format provided",
"error_code": "INVALID_PURL"
"info_message": "Invalid PURL format provided",
"info_code": "INVALID_PURL"
},
"status": {
"status": "SUCCESS",
Expand All @@ -78,21 +78,24 @@ curl -X GET 'https://api.scanoss.com/v2/cryptography/algorithms/component?purl=p
}
```

### Error Handling
### Info Codes

Component responses include optional error fields when issues occur during processing:
Component blocks report the processing outcome via `info_code` and `info_message`:

- `error_message`: Human-readable description of the error
- `error_code`: Machine-readable error code for programmatic handling
- `info_code`: Machine-readable code identifying the outcome of processing the component.
- `info_message`: Human-readable description of the outcome.

#### Error Codes
The `info_code` field reports the outcome of processing each component. Possible values:

- `INVALID_PURL`: The provided PURL format is invalid
- `COMPONENT_NOT_FOUND`: The component was not found in the database
- `NO_INFO`: No cryptographic information available for the component
- `INVALID_SEMVER`: The provided semantic version or requirement is invalid
| Code | Meaning |
|------|---------|
| `INVALID_PURL` | The provided Package URL (PURL) is invalid or malformed. |
| `COMPONENT_NOT_FOUND` | The requested component could not be found in the database. |
| `NO_INFO` | No cryptography information is available for the requested component. |
| `INVALID_SEMVER` | The provided semantic version (SemVer) is invalid or malformed. |
| `VERSION_NOT_FOUND` | The specific component version could not be found. |

**Note**: When a component-level error occurs, the overall response status remains "SUCCESS" since the request was processed. Individual component errors are indicated within the component block itself.
**Note**: When a component-level processing issue occurs, the overall response status remains `SUCCESS` since the request was processed. The per-component outcome is carried inside the component block via `info_code`/`info_message`.

## GetComponentsAlgorithms

Expand Down Expand Up @@ -174,8 +177,8 @@ curl -X POST 'https://api.scanoss.com/v2/cryptography/algorithms/components' \
"requirement": ">=1.0.0",
"version": "",
"algorithms": [],
"error_message": "Component not found in database",
"error_code": "COMPONENT_NOT_FOUND"
"info_message": "Component not found in database",
"info_code": "COMPONENT_NOT_FOUND"
}
],
"status": {
Expand Down Expand Up @@ -249,8 +252,8 @@ Each algorithm object contains:
"purl": "pkg:github/example/simple-utility",
"versions": [],
"algorithms": [],
"error_message": "Component not found: 'pkg:github/example/simple-utility'",
"error_code": "COMPONENT_NOT_FOUND"
"info_message": "Component not found: 'pkg:github/example/simple-utility'",
"info_code": "COMPONENT_NOT_FOUND"
},
"status": {
"status": "SUCCESS",
Expand Down Expand Up @@ -404,8 +407,8 @@ Hints are classified into the following categories:
"purl": "pkg:github/example/simple-utility",
"version": "1.0.0",
"hints": [],
"error_message": "No info found for: pkg:github/example/simple-utility",
"error_code": "NO_INFO"
"info_message": "No info found for: pkg:github/example/simple-utility",
"info_code": "NO_INFO"

},
"status": {
Expand Down
Loading
Loading