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

[CPDNPQ-2225] qualifications API for TRS - part of DQT decommissioning #2115

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

alkesh
Copy link
Contributor

@alkesh alkesh commented Jan 10, 2025

Context

Ticket: https://dfedigital.atlassian.net/browse/CPDNPQ-2225

Changes proposed in this pull request

  • new qualifications API - returns a combination of passed participant outcomes from NPQ and the legacy participant outcomes loaded from the DQT data extract.
  • added scope to APIToken - this is either lead_provider or teacher_record_service - and a token from one scope cannot access the APIs from the other scope
  • new one off rake task to load legacy participant outcomes - which is from an extract from DQT
  • new rake task to create a teacher_record_service APIToken
  • document describing the API (docs/qualifications_api.md)

Copy link

app/models/participant_outcome.rb Outdated Show resolved Hide resolved
app/models/participant_outcome.rb Outdated Show resolved Hide resolved
db/migrate/20241104164154_add_scope_to_api_tokens.rb Outdated Show resolved Hide resolved
app/models/api_token.rb Outdated Show resolved Hide resolved
lib/tasks/api_token.rake Outdated Show resolved Hide resolved
spec/models/api_token_spec.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@jebw jebw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - couple of comments around schema changes and API path

The actual API format makes me wince a little since this is what JSON:API has include and entity relationships for but it is following the pattern of our other APIs and does make it simpler to consume for someone just parsing as raw JSON (instead of using a JSON:API client)

config/routes.rb Outdated Show resolved Hide resolved
db/migrate/20241104164154_add_scope_to_api_tokens.rb Outdated Show resolved Hide resolved
db/schema.rb Show resolved Hide resolved
spec/factories/api_tokens.rb Outdated Show resolved Hide resolved
spec/rails_helper.rb Show resolved Hide resolved
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.

3 participants