Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated CIE schema to avoid issue on tag order in ContactPerson #149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PiemP
Copy link

@PiemP PiemP commented Sep 13, 2022

Fixes #115

  • added some missing tag to PublicGroup
  • make mandatory VATNumber and FiscalCode in PrivateGroup (I'm not sure about that but here says both are mandatory)
  • removed some extra code

added some missing tag to PublicGroup
make mandatory VATNumber and FiscalCode in PrivateGroup
removed some extra code
@PiemP
Copy link
Author

PiemP commented Sep 13, 2022

I have tested my code with some different situations and I have found that remains #121 to fix. The problem is about, when check a private service provider metadata, the code that ask about a ContactPerson as technical. But this is not mandatory.
Could exist a private service provider with only one ContactPerson that have attribute contactType set as administrative.

ERROR:spid_sp_test.metadata:The //ContactPerson[@contactType='technical']/EmailAddress element MUST be present
ERROR:spid_sp_test.metadata:Missing ContactPerson/Extensions/Private, this element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_extensions_public_private: The Public element MUST not be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: ContactPerson MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: ("Missing contactType in {'contactType': 'administrative'}: The contactType attribute MUST be present",)
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: The contactType attribute MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: The contactType must be "administrative"
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: Only one ContactPerson element of contactType "administrative" MUST be present
ERROR:spid_sp_test.metadata:ContactPerson MUST be present
ERROR:spid_sp_test.metadata:Only one ContactPerson element of contactType "technical" MUST be present

I suppose must be implement this test for ContactPerson:

  • must exist one ContactPerson as administrative
    • if is private, check ContactPerson field for private case
    • if is public, check ContactPerson field for public case
  • if exist another ContactPerson, check is technical (no both administrative)
    • if is private, check ContactPerson field for private case
    • if is public, check ContactPerson field for public case

PiemP added a commit to PiemP/cie-aspnetcore that referenced this pull request Sep 13, 2022
- aggiunte delle estensioni mancanti dentro CieExtensions.cs
- sistemato l'ordine dei tag esposti sotto l'elemento ContactPerson per evitare errori con spid-sp-test
- sistemato CieOptions.cs
- aggiornati gli XSD a seguito delle attività su italia/spid-sp-test#149 e su italia/spid-sp-test#148
- aggiornato README.md
@peppelinux peppelinux requested review from damikael and nunzionapoli and removed request for damikael and nunzionapoli September 30, 2022 12:04
@peppelinux
Copy link
Member

Ciao @PiemP

thank you first of all for this precious PR.
I have to tell you that the xsd file was shared by collegues in IPZS that work on CIE, so I'm going to ask to them a revision on your contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CIE public SP metadata validation - VATNumber not recognized?
2 participants