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

Feature branch: Ats Api #7322

Draft
wants to merge 65 commits into
base: main
Choose a base branch
from
Draft

Feature branch: Ats Api #7322

wants to merge 65 commits into from

Conversation

scruti
Copy link
Collaborator

@scruti scruti commented Nov 29, 2024

Trello card URL

Changes in this PR:

  • Is there anything specific you want feedback on?

Screenshots of UI changes:

Before

After

Next steps:

  • Terraform deployment required?

  • New development configuration to be shared?

starswan and others added 24 commits November 7, 2024 16:50
* origin/main: (87 commits)
  Correct Slim-lint violations
  Manually fix the rest of rubocop violations
  Extract shared code and fix its style violations
  Fix wrong named instance doubles
  Autocorrect new Rubocop violations
  Upgrade rubocop-govuk gem to latest version
  Bump the npm-dependencies group with 3 updates (#7301)
  fix seed loading error (#7296)
  Set Selenium Chrome to latest version on Devcont.
  Integrate Rails debugging into Devcontainers
  Override foreman's environment handling  (#7288)
  Fix Ventrus school mapping
  format main duties properly
  Fix full stops in email links.
  Remove job_title page inset text as it doesn't add much value
  Ensure the hyphen is not hyperlinked
  Fix bullet point lists
  Fix notify links
  Fix tests
  Fix rubocop linting issue
  ...
* origin/main: (30 commits)
  Linting
  Remove hard dependecy for rackup
  Return not found if someone tries to navigate to a transcripts subcategory
  Remove deprecatation warning 2022 (#7313)
  Remove rackup version restriction
  Update filter logging spec to account for regexps
  Bump the gem-dependencies group with 4 updates (#7314)
  Bump valid_email2 from 6.0.0 to 7.0.0
  Remove sentry config from application.html.slim
  Add empty line after guard clause
  Guard clause
  Update Job Advert HTML following Rails upgrade
  Update defaults base to 7.1
  Remove breadcrumbs from transcripts guides/posts
  Add rackup hard dependency
  Remove unnecessary message encryptor class
  Update Job Advert HTML following Rails upgrade
  Update not_found to be public
  Upgrade defaults for Rails 7.2
  Update subscription alerts serializers
  ...
The original API in the service is an API that the public can consume to
get information about the posted vacancies.

The new API is going to be private and only accessible to the ATS so
they can Publish their vacancies into our system.

To avoid confusion, extracted the new API definition under the following
path in our project:

"app/controller/publishers/ats_api/v1/...."

So developers can identify the scope of this API.

To avoid a long convoluted API endpoint for our clients, we will expose
it under "/ats-api/v1" path.
Add authorization by API provided in the request header.
Add schemas for standard errors with examples.
Add a proposed format for validation errors. It will be used by the
create and update endpoints.

Add one example to both endpoints.
The vacancy schema will be shared across multiple responses:
- Individual vacancies listed in the get all the vacancies operation.
- Individual vacancy retrieval.
- Response for creating a vacancy.
- Response for updating a vacancy.
To check how implementation works against swagger tests.
Follow same pattern defining a schema with an example for generating the
documentation.
Arr a conflict error when trying to create a vacancy with a reference
that is already used by other vacancy.
When building the documentation for swagger, it keeps the old
documentation as a "cache hit" even when the swagger schemas have been
changed, or if the controller implementation (used for generating
automatic examples on the docs) changed.

Adding both the swagger helper and api controller files to the hashed
files used for generating the cache key should resolve this, as when any
of those files is touched, the swagger cache will become invalid and a
new cached version will be generated.
The generation of swagger documentation seemed to be happening every
time, and then being overridden by the cached version.

We are changing them to first check if the cached version can be
used/restored, and only generating the docs if the attempt to find and
restore a cached version failed.

The "cache" action has a post step to save the cache. So the documents
generated in the "swagger" path will be cached afterwards.
Namespace ATS-API and and extend its documentation
@scruti scruti changed the title Feature branch: Ats api Feature branch: Ats Api Nov 29, 2024
Copy link

Review app deployed to https://teaching-vacancies-review-pr-7322.test.teacherservices.cloud on AKS

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

Successfully merging this pull request may close these issues.

3 participants