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.GetDocumentReply #40

Open
fabienpe opened this issue Apr 12, 2024 · 2 comments
Open

Problem with apiv1.GetDocumentReply #40

fabienpe opened this issue Apr 12, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@fabienpe
Copy link

If I understand correctly the information provided in Swagger, when requesting a document with the /api/v1/document, the response is expected to be of the form (according to the : /swagger/doc.json)

{
"apiv1.GetDocumentReply": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/model.Upload"
                }
            }
        }

and therefore something like:

{
  "data": {
    "attestation": {
      "description_long": "string",
      "description_short": "string",
      "type": "string",
      "version": 0
    },
    "document_data": "string",
    "identity": {
      "age_birth_year": "string",
      "age_in_years": "string",
      "age_over_18": "string",
      "age_over_nn": "string",
      "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",
      "uid": "string",
      "version": "string"
    },
    "meta": {
      "authentic_source": "string",
      "authentic_source_person_id": "string",
      "collect_id": "string",
      "created_at": "string",
      "date_of_birth": "string",
      "document_id": "string",
      "document_type": "PDA1",
      "document_version": 1,
      "first_name": "string",
      "last_name": "string",
      "member_state": "string",
      "revocation_id": "string",
      "uid": "string",
      "valid_from": "string",
      "valid_to": "string"
    },
    "qr": {
      "base64_image": "string",
      "deep_link": "string"
    }
  }
}

However I get something of the form:

{
  "data": {
    "meta": {
      "revocation_id": "string",
      "collect_id": "string",
      "created_at": "date"
    },
    "document_data": null,
    "qr": null
  }
}
@masv3971
Copy link
Collaborator

Thank you for reaching out, #39 is meant to solve this.

@masv3971 masv3971 self-assigned this Apr 12, 2024
@masv3971 masv3971 added the documentation Improvements or additions to documentation label Apr 12, 2024
@fabienpe
Copy link
Author

FYI - I'm using

commit 1f7e8d89ca254186134e8b1bea86ad5967004c18 (HEAD -> main, origin/main, origin/HEAD)
Author: masv3971 <[email protected]>
Date:   Wed Apr 3 14:56:40 2024 +0200

    Add documentation about swagger.

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

No branches or pull requests

2 participants