-
Notifications
You must be signed in to change notification settings - Fork 125
Feature/rspec api documentation integration #269
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/rspec api documentation integration #269
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loved it!
What do you think of adding something like this https://github.com/juanmanuelramallo/target-mvd/blob/master/spec/support/devise_token_auth_overrides.rb to make the API Blueprint document always use the same access token and client id, just to avoid unnecessary changes in the document (?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply B E A U T I F U L
Co-authored-by: Juan Manuel Ramallo <[email protected]>
…com:rootstrap/rails_api_base into feature/rspec-api-documentation-integration
Co-authored-by: Juan Manuel Ramallo <[email protected]>
…com:rootstrap/rails_api_base into feature/rspec-api-documentation-integration
…#472) * Revert "Merge pull request #269 from rootstrap/feature/rspec-api-documentation-integration" This reverts commit 84f3dbd, reversing changes made to f01515f. * Move featue-flags spec to /requests/admin * Add rspec-openapi * Initial doc * Using seed 1993 * Freeze test data for docs * Set docs with freezed data * Freeze devise auth token * Rubocop fixes * Create update docs script. Add it to CI to check for missing doc changes * Latest doc version * Do not change password reset token in specs * Fix code smell * Test changes * Make script trim whitespaces * Add docs workflow. Make bin/update-docs parallel * Remove docs from main CI * Set when action runs * Update label name * Setup autolabeler * Set new job for labeler * Set new worflow for labeler * Set condition for PR open * New update doc * Use new ruby script to update doc files * Set rspec-openapi path to handle parallel specs * Use new script and force to run with 8 cores * Use bundle exec to run script * Workflow fixes * Remove trailing whitespace * Run update-docs on push * Update workflow * Set cpu count for load schema * Handle ocassional errors. Clean files always * Fix parallel specs * Clear whitespaces from doc file * Remove update-docs bash file * Update update-docs action * Update README with doc * Fix endpoint in spec * Move CI docs to ci file * Change labeler config * Update labeler * Fix labeler * Move labeler to update docs action * Update docs labeler test * Use target * Use token * Run on merge with main or PR * Fix labeler path * Fix condition * Small fixes * README fixes * Remove unused api blueprint file * Clean up setup * Add comment to initializer * Rename action to check-docs * Sort endpoints alphabetically * Small improvements * Update docs * Make the default be parallelized * Stop freezing time in specs, set dates with regex in doc file * Update api_doc readme * Freeze timestamps via regex and not specs * Make doc check action run on pull_request and push on main * Update Docs and README * Use api_docs label * Remove unnecessary configs * Remove unnecessary permissions * Freeze timestamps in update-docs * Update rspec-openapi to v0.9 * Improve date freezing in script * Improve api_docs readme * Improve readme * Only run openapi initializer in test * Fix code climate for pull_request events * Make the CI commit doc changes * Rename update-docs script * Make CI update docs with parallelization on main push * Remove unnecessary canges to freeze test data * Update README * Remove changes from password spec * Skip feature flags for openapi * Update CI and docs * Add push key to bypass branch protections * Remove duplicate endpoints when merging docs * Copy changes to docs and ci * Remove duplicate permissions * Document ignoring specs
Board:
Description:
This PR adds
rspec_api_documentation
gem and all API endpoint acceptance specs to help us to auto-document it. IMO having this gem and the specs as an example will help us to encourage acceptance specs in the projects that use this base as a template, giving good documentation about their APIs.Notes:
aws-sdk-s3', '~> 1.75
changed in gemfile to makebundle install
worksRspecApiDocumentation
initializer has monkey patching to prevent an issue with Rails 6. (this has been already fixed in Documentation no longer include JSON response body when using with Rack >= 2.1.0 zipmark/rspec_api_documentation#456 and I'm waiting for a new release of the gem)apiary.apib
is now generated by./bin/docs
task