Skip to content

Add complete plan flag to V2 API#3592

Open
momo3404 wants to merge 9 commits intoapi_v2_dmponlinefrom
momo/v2-api-qa-flag
Open

Add complete plan flag to V2 API#3592
momo3404 wants to merge 9 commits intoapi_v2_dmponlinefrom
momo/v2-api-qa-flag

Conversation

@momo3404
Copy link
Collaborator

Changes proposed in this PR:

  • Add the complete flag to the V2 API to enable accessing all questions and answers belonging to a plan in the API response.
  • Per the V2 API Documentation: "The idea is to have a flag which defaults to false and thereby is compliant with the RDA metadata standard, but can be passed in with a value of true to include the questions and answers of the plan."
  • The flag is optional and works with the api/v2/plans and api/v2/plans/[plan_id] endpoints. For example: api/v2/plans/12345?complete=true.
  • The schema the flag returns is as follows:
  •       "complete_plan": [
              {
                "title": "Question 1",
                "question": "<p>What considerations will you take into account with respect to ethical, legal, or commercial issues?</p>\r\n<p><br>Describe any applicable ethical, legal, or commercial considerations related to your project and data. This includes research involving Indigenous communities and knowledges, human subjects, legal and commercial considerations/agreements, partnerships or data with a high level of risk associated with it.</p>",
                "answer": "<p>test</p>"
              },
              {
                "title": "Question 2",
                "question": "<p>What data will you collect or otherwise bring into your project under this plan?</p>\r\n<p><br>Describe the data that will be collected, generated, and/or acquired.</p>",
                "answer": "<p>test</p>"
              },
            ]
    
  • Questions with no answers are not included in the response.

- This optional parameter will return all questions and answers in a plan when set to true
- Add the fetch_all_q_and_a function to return all questions and answers belonging to a plan to allow flag to work
- Add complete_plan_data to call fetch function inside initialize
- Add call for complete flag
- Add questions and answers of a plan to the json if complete is set to true
@github-actions
Copy link

github-actions bot commented Jan 29, 2026

</tr>
1 Error
🚫

Please include a CHANGELOG entry.

You can find it at [CHANGELOG.md](https://github.com/DMPRoadmap/roadmap/blob/main/CHANGELOG.md).
1 Warning
⚠️ There are code changes, but no corresponding tests. Please include tests if this PR introduces any modifications in behavior. \n
Ignore this warning if the PR ONLY contains translation.io synced updates.

Generated by 🚫 Danger

- This optional parameter will return all questions and answers in a plan when set to true
- Add the fetch_all_q_and_a function to return all questions and answers belonging to a plan to allow flag to work
- Add complete_plan_data to call fetch function inside initialize
- Add call for complete flag
- Add questions and answers of a plan to the json if complete is set to true
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.

2 participants