registry/internal/validators
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Avish Porwal adfbfafcf8
npm package validation: require identifier and version (#424)
<!-- Provide a brief summary of your changes -->
Adding validation for version and identifier for packages.

## Motivation and Context
While debugging a bug, I found out that we need exact version to be
there in package to fetch from npm, otherwise we won't be able to parse
the response as it returns all versions. Even if we do, we still need to
go and figure out which version have the mcpname associated with while
iterating over all versions. So, we should make mandatory to have
identifier and version present in the given package object if we want to
validate package association with registries.


## How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were
tested? -->
UTs.

## Breaking Changes
<!-- Will users need to update their code or configurations? -->

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->

Co-authored-by: Avish Porwal <avishporwal@microsoft.com>
2025-09-10 13:21:04 -07:00
..
registries npm package validation: require identifier and version (#424) 2025-09-10 13:21:04 -07:00
constants.go Ban 'latest' as a reserved version string (#413) 2025-09-10 17:52:08 +00:00
package.go Add registry validators (#350) 2025-09-04 22:45:59 +01:00
utils.go Add optional subfolder field to Repository schema (#363) 2025-09-05 21:29:09 +01:00
validators.go Ban 'latest' as a reserved version string (#413) 2025-09-10 17:52:08 +00:00
validators_test.go Ban 'latest' as a reserved version string (#413) 2025-09-10 17:52:08 +00:00