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

Problem with apiv1.GetDocumentCollectIDReply #61

Open
fabienpe opened this issue May 10, 2024 · 3 comments
Open

Problem with apiv1.GetDocumentCollectIDReply #61

fabienpe opened this issue May 10, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@fabienpe
Copy link

fabienpe commented May 10, 2024

On version: 25298ad

apiv1.GetDocumentCollectIDReply is defined as "$ref": "#/definitions/model.Upload", which itself contains a meta property defined in "$ref": "#/definitions/model.MetaData". But model.MetaDatarequiresdate_of_birth, first_nameandlast_name` which are not provided in the actual response.

In other words, while the announced output is:

{
  "data": {
    "attestation": {
      "description_long": "string",
      "description_short": "string",
      "description_structured": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "type": "string",
      "version": "string"
    },
    "document_data": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "identity": {
      "birth_city": "string",
      "birth_country": "string",
      "birth_date": "string",
      "birth_place": "string",
      "birth_state": "string",
      "family_name": "string",
      "family_name_at_birth": "string",
      "gender": "string",
      "given_name": "string",
      "given_name_at_birth": "string",
      "nationality": "string",
      "resident_address": "string",
      "resident_city": "string",
      "resident_country": "string",
      "resident_house_number": "string",
      "resident_postal_code": "string",
      "resident_state": "string",
      "resident_street": "string",
      "version": "string"
    },
    "meta": {
      "authentic_source": "string",
      "authentic_source_person_id": "string",
      "collect_id": "string",
      "created_at": 0,
      "date_of_birth": "string",
      "document_id": "string",
      "document_type": "PDA1",
      "document_version": "string",
      "first_name": "string",
      "last_name": "string",
      "member_state": "string",
      "revocation": {
        "follow_up_credential": "string",
        "id": "string",
        "reason": "string",
        "revoked": true,
        "revoked_at": 0
      },
      "valid_from": 0,
      "valid_to": 0
    },
    "qr": {
      "base64_image": "string",
      "deep_link": "string"
    }
  }
}

I just get:

{
    "data": {
        "meta": {
            "authentic_source": "string",
            "authentic_source_person_id": "string",
            "document_version": "string",
            "document_type": "PDA1",
            "document_id": "string",
            "collect_id": "string",
            "member_state": "string",
            "valid_from": int,
            "valid_to": int
        },
        "document_data": {
            "string": "string"
        }
    }
}
@masv3971
Copy link
Collaborator

The output is defined in api 2.4 documentation provided from Thomas. The rational of this is to minimize the amount of types with in the code base. If each endpoint had to have its own (complex) type, changes will be harder to achieve.

@fabienpe
Copy link
Author

OK. That's a pity because if you use a tool such as https://github.com/OpenAPITools/openapi-generator to convert the JSON provided by the Swagger of the DC4EU API, to generate client code, then it only partly works because the behaviour of the API does not exactly match the JSON.

@masv3971
Copy link
Collaborator

I have come to understand that, this needs to be addressed for sure. Many is using some generator to generate client code. Will fix this.

@masv3971 masv3971 self-assigned this May 23, 2024
@masv3971 masv3971 added the bug Something isn't working label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants