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

Expand the information retrived by the API #515

Closed
cptanalatriste opened this issue Jun 27, 2024 · 1 comment
Closed

Expand the information retrived by the API #515

cptanalatriste opened this issue Jun 27, 2024 · 1 comment
Assignees
Labels
improved navigation Sprint 1: Improved navigation of cases

Comments

@cptanalatriste
Copy link
Collaborator

cptanalatriste commented Jun 27, 2024

This issue is a dependency of #492

Currently, when retrieving case information strategy items do not contain type information. For example, the request https://staging-eap-backend.azurewebsites.net/api/cases/51/ returns:

{
    "id": 51,
    "type": "AssuranceCase",
    "name": "demo",
    "description": "demo",
    "created_date": "2024-06-19T22:10:07.047079Z",
    "lock_uuid": null,
    "goals": [
        {
            "id": 97,
            "type": "TopLevelNormativeGoal",
            "name": "G1",
            "short_description": "G1",
            "long_description": "N/A",
            "keywords": "N/A",
            "assurance_case_id": 51,
            "context": [
                {
                    "id": 133,
                    "type": "Context",
                    "name": "C1",
                    "short_description": "C2",
                    "long_description": "C2",
                    "created_date": "2024-06-21T09:58:59.618702Z",
                    "goal_id": 97
                }
            ],
            "property_claims": [],
            "strategies": [
                {
                    "id": 243,
                    "name": "S1",
                    "short_description": "Collapsed strategy",
                    "long_description": "S2",
                    "goal_id": 97,
                    "property_claims": [
                        {
                            "id": 1646,
                            "type": "PropertyClaim",
                            "name": "P1",
                            "short_description": "P2",
                            "long_description": "P2",
                            "goal_id": null,
                            "property_claim_id": null,
                            "level": 1,
                            "claim_type": "Property Claim",
                            "property_claims": [
                                {
                                    "id": 1647,
                                    "type": "PropertyClaim",
                                    "name": "P1.1",
                                    "short_description": "P 2.2",
                                    "long_description": "P 2.2",
                                    "goal_id": null,
                                    "property_claim_id": 1646,
                                    "level": 2,
                                    "claim_type": "Property Claim",
                                    "property_claims": [],
                                    "evidence": [],
                                    "strategy_id": null
                                }
                            ],
                            "evidence": [],
                            "strategy_id": 243
                        },
                        {
                            "id": 1776,
                            "type": "PropertyClaim",
                            "name": "P2",
                            "short_description": "This is a new claim",
                            "long_description": "This is a new claim",
                            "goal_id": null,
                            "property_claim_id": null,
                            "level": 1,
                            "claim_type": "Property Claim",
                            "property_claims": [],
                            "evidence": [],
                            "strategy_id": 243
                        }
                    ]
                },
                {
                    "id": 254,
                    "name": "S2",
                    "short_description": "New Strategy",
                    "long_description": "New Strategy",
                    "goal_id": 97,
                    "property_claims": [
                        {
                            "id": 1777,
                            "type": "PropertyClaim",
                            "name": "P3",
                            "short_description": "New Claim",
                            "long_description": "New Claim",
                            "goal_id": null,
                            "property_claim_id": null,
                            "level": 1,
                            "claim_type": "Property Claim",
                            "property_claims": [],
                            "evidence": [],
                            "strategy_id": 254
                        }
                    ]
                }
            ]
        }
    ],
    "owner": 4,
    "edit_groups": [],
    "view_groups": [],
    "color_profile": "default",
    "comments": [],
    "permissions": "manage"
}

Notice that strategy elements are missing type information, unline case or goal. For example, goal creation returns the following: {"name": "P3.3.1", "id": 1783}. @RichGriff , please specify what extra information you need.

@RichGriff
Copy link
Collaborator

@cptanalatriste this looks to have done the job 👍 we now get the type back and the whole object that was created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improved navigation Sprint 1: Improved navigation of cases
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants