Add links attribute and gem setup fixes #105
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the current behavior?
bundle exec rake spec
.links
attributes as per JSON:API Specification.What is the new behavior?
1. Solved an issue with Rails
secret_key_base
configI couldn't find any mention of
secrets
orsecrets.yml
in the project, and it also doesn't have an encrypted secrets file (credentials,secrets.yml.enc
), any.env
file or a in instruction on README to add the expect ENV var. Because of this, every time I tried to run the project, I encountered the following error:To address this, I updated the configuration to match what the Rails::Application object expects. Now, the specs and gem setup work correctly, allowing the tests and QA rake tasks to run as expected without any additional changes.
2. Resolved an Issue with the 422 Error Description
The Rack utils.rb defines the HTTP 422 error as Unprocessable Content, but the specs expect it to be Unprocessable Entity. I'm not entirely sure which is correct, but according to the specification, it should be Unprocessable Content. In any case, I've updated the specs to accept both.
3. Added
links
Attribute inErrorSerializer
I implemented a monkey patch in my app to provide this attribute, but I believe it should be included by default, similar to how the
code
attribute was previously added. Here's the specification reference for this attribute:Checklist
Please make sure the following requirements are complete:
features)