erasmus-without-paper / ewp-specs-api-factsheet

MIT License
1 stars 1 forks source link

Fix for targetNamespace and xmlns of factsheet response xsd #3

Closed tsiakmaki closed 2 years ago

tsiakmaki commented 2 years ago

Hi,

If i am not wrong, the targetNamespace and xmlns of the factsheet's response.xsd: https://github.com/erasmus-without-paper/ewp-specs-api-factsheet/blob/stable-v1/response.xsd#L5

should be

<xs:schema 
...
targetNamespace="https://github.com/erasmus-without-paper/ewp-specs-api-factsheet/tree/stable-v1/response.xsd"
xmlns="https://github.com/erasmus-without-paper/ewp-specs-api-factsheet/tree/stable-v1/response.xsd" >
mkurzydlowski commented 2 years ago

You are right the namespace usually ends with "response.xsd" in EWP APIs but this is not a rule:

https://github.com/erasmus-without-paper/ewp-specs-types-contact/blob/stable-v1/schema.xsd https://github.com/erasmus-without-paper/ewp-specs-types-academic-term/blob/stable-v2/schema.xsd

There is no common convention for namespace names but I wouldn't personally use an URI that ends with a file extension and would stick to namespace names like:

http://www.w3.org/1999/XSL/Transform

tsiakmaki commented 2 years ago

ok. thank you. personally, i would prefer with the file extension, as this stands for the rest ewp endpoints.

What about when branch or tag changes?

E.g. tag v0.2.0 https://github.com/erasmus-without-paper/ewp-specs-api-factsheet/blob/v0.2.0/response.xsd

has the same namespace with stable-v1 branch: targetNamespace="https://github.com/erasmus-without-paper/ewp-specs-api-factsheet/tree/stable-v1" xmlns="https://github.com/erasmus-without-paper/ewp-specs-api-factsheet/tree/stable-v1"

mkurzydlowski commented 2 years ago

We use stable-v1 namespace even before 1.x release so the namespace doesn't need to change after the release.

tsiakmaki commented 2 years ago

ok. thank you @mkurzydlowski .

mkurzydlowski commented 2 years ago

Both issues seem to be described here: https://github.com/erasmus-without-paper/ewp-specs-management#git-branches-and-xml-namespaces

What I have also noticed is that that document suggests that the proper namespace should link to a GitHub branch (not XML schema file).