NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 252 forks source link

Update nuspec.xsd to include id regex #6124

Open ohadschn opened 7 years ago

ohadschn commented 7 years ago

The schema doesn't seem to impose any restrictions on them (even though XSD regex patterns are possible). The docs only say "IDs may not contain spaces or characters that are not valid for a URL".

But this is incomplete, as the implementation and tests suggest. Specifically, names must conform to ^\w+([_.-]\w+)*$. I don't know what the restrictions on version strings are, but I reckon there are some.

emgarten commented 7 years ago

This issue was moved to NuGet/docs.microsoft.com-nuget#543

ohadschn commented 7 years ago

@emgarten does the schema (XSD) update part also fall under doc changes?

emgarten commented 7 years ago

does the schema (XSD) update part also fall under doc changes?

Saw the link the docs for the schema, didn't see it was also in the client repo. I've opened this.

Would you be willing to send a PR to update the schema and verify that it works with the change you mentioned?

ohadschn commented 7 years ago

Where can I find the validation logic / regex for package versions?

emgarten commented 6 years ago

@ohadschn take a look at NuGet.Packaging and the authoring validation there.