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

Update Teacher Training API to return selectable_school #4465

Conversation

inulty-dfe
Copy link
Contributor

@inulty-dfe inulty-dfe commented Aug 20, 2024

Context

We have added a property to Provider, selectable_school. We want to provider this property via the API.

This property must be documented in the API docs.

Changes proposed in this pull request

  • Add selectable_school to the ProviderAttributes API response.
  • Update documentation on how to develop the API docs

Guidance to review

https://publish-review-4465.test.teacherservices.cloud/docs/#about

API response

curl -H 'content-type: application/json' http://publish.localhost:3001/api/public/v1/recruitment_cycles/2024/providers/2AT | jq '.data.attributes.selectable_school'

API docs

http://publish.localhost:3001/api_docs`

image

image

Trello Ticket

Update Publish API to return selectable school as part of the Providers API

Things to check

  • This code does not rely on migrations in the same Pull Request
  • If this code includes a migration adding or changing columns, it also backfills existing records for consistency
  • If this code adds a column to the DB, decide whether it needs to be in analytics yml file or analytics blocklist
  • API release notes have been updated if necessary
  • Required environment variables have been updated added to the Azure KeyVault
  • Inform data insights team due to database changes
  • Make sure all information from the Trello card is in here
  • Rebased main
  • Cleaned commit history
  • Tested by running locally
  • Attach PR to Trello card

  `selectable_school` is a property of a Provider in the TTAPI
  The middleman gem uses ruby 2.7 so we build it in the container and
  copy the output to the public directory
@inulty-dfe inulty-dfe force-pushed the 2202-update-publish-api-to-return-selectable-school-as-part-of-the-providers-api branch from 5930629 to c3cbe6a Compare August 21, 2024 08:11
@inulty-dfe inulty-dfe requested a review from a team August 21, 2024 08:24
@inulty-dfe
Copy link
Contributor Author

Use the following command to generate OpenAPI specification:

```sh
bundle exec rake rswag:specs:swaggerize
```
Copy link
Contributor

@tomas-stefano tomas-stefano Aug 21, 2024

Choose a reason for hiding this comment

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

The command is duplicated below. Both lines execute the same command.

Copy link
Contributor

@tomas-stefano tomas-stefano left a comment

Choose a reason for hiding this comment

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

After removing the duplication in the document, looks good 🚀

@inulty-dfe inulty-dfe merged commit b45b811 into main Aug 21, 2024
19 checks passed
@inulty-dfe inulty-dfe deleted the 2202-update-publish-api-to-return-selectable-school-as-part-of-the-providers-api branch August 21, 2024 13:25
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