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

Mismatch between specification and behaviour? #70

Open
fabienpe opened this issue Jul 19, 2024 · 2 comments
Open

Mismatch between specification and behaviour? #70

fabienpe opened this issue Jul 19, 2024 · 2 comments
Assignees
Labels
api_v2.8 bug Something isn't working validation

Comments

@fabienpe
Copy link

fabienpe commented Jul 19, 2024

Specifications v2.8 says that the only required fields in the upload request are meta, document_data and document_data_version.

Example:

{
    "document_data": {
        "w38hOqRBEWxFQ1SJ": {
            "oXzd6yiuoKgqUZJx": null
        }
    },
    "document_data_version": "893.85.909",
    "meta": {
        "authentic_source": "ONSS",
        "document_id": "vZ9jQ1uaPIoA5E9Js",
        "document_type": "EHIC",
        "document_version": "31.227.390",
        "real_data": false
    }
}

However uploading a request with this limited set of data returns a validation error saying that identities and document_display are required:

{
  "error": {
    "title": "validation_error",
    "details": [
      {
        "field": "identities",
        "namespace": "identities",
        "type": "slice",
        "validation": "required",
        "validationParam": "",
        "value": null
      },
      {
        "field": "document_display",
        "namespace": "document_display",
        "type": "ptr",
        "validation": "required",
        "validationParam": "",
        "value": null
      }
    ]
  }
}

After adding an identity and a document_display, with required information only, I get a internal_server_error message:

{
    "document_data": {
        "w38hOqRBEWxFQ1SJ": {
            "oXzd6yiuoKgqUZJx": null
        }
    },
    "identities": [
    ],
    "document_display": {
        "description_structured": {
            "en": {
                "en": "European Health Insurance Card"
            }
        },
        "type": "X1uLdqWJPY",
        "version": "848.484.712"
    },
    "document_data_version": "893.85.909",
    "meta": {
        "authentic_source": "ONSS",
        "document_id": "vZ9jQ1uaPIoA5E9Js",
        "document_type": "EHIC",
        "document_version": "31.227.390",
        "real_data": false
    }
}

Adding "collect": {}, in meta solves the issue.

I'm running docker.sunet.se/dc4eu/apigw:latest sha256:86501d0238553b509fe8780ef6749d31e937bf0d903476921610cd73266af03d created 2024-07-19T12:56:59.73451228Z

@masv3971 masv3971 added api_v2.8 bug Something isn't working validation labels Aug 28, 2024
@masv3971
Copy link
Collaborator

masv3971 commented Aug 30, 2024

This should be fixed, 3d60ea9 and aa395fa.

Download the latest version of docker.sunet.se/dc4eu/apigw:apiv28 and try it.

@masv3971 masv3971 self-assigned this Sep 24, 2024
@rappelarsson
Copy link

Hi,

I still have the problem of 500 internal server error when leaving out the collect object, I am using docker.sunet.se/dc4eu/apigw:0.5.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api_v2.8 bug Something isn't working validation
Projects
None yet
Development

No branches or pull requests

3 participants