Remove namespace match validation for websiteUrl and remote URL (#769)
<!-- Provide a brief summary of your changes --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> Resolve https://github.com/modelcontextprotocol/registry/issues/768 and https://github.com/modelcontextprotocol/registry/issues/494. Require HTTPS for remote URLs. Currently all remote URLs on the MCP Registry are HTTPS. Also fix a test bug when running on Windows (bad temp path). ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> Unit tests. Published a server.json locally with a website URL not matching the server name. ## 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: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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. --> - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [ ] ~I have added or updated documentation as needed~ N/A ## Additional context <!-- Add any other context, implementation notes, or design decisions -->
This commit is contained in:
parent
d9c2e506a9
commit
45bf43f9d1
1 changed files with 30 additions and 118 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/modelcontextprotocol/registry/internal/config"
|
||||
|
|
@ -20,7 +21,7 @@ import (
|
|||
|
||||
func TestImportService_LocalFile(t *testing.T) {
|
||||
// Create a temporary seed file
|
||||
tempFile := "/tmp/test_import_seed.json"
|
||||
tempFile := filepath.Join(os.TempDir(), "test_import_seed.json")
|
||||
seedData := []*apiv0.ServerJSON{
|
||||
{
|
||||
Schema: model.CurrentSchemaURL,
|
||||
|
|
|
|||
Loading…
Reference in a new issue