Skip to content

Conversation

@bf4
Copy link
Contributor

@bf4 bf4 commented Apr 25, 2024

Follows #515

There are failing tests in here which anyone should feel free to make a PR to address

@bf4
Copy link
Contributor Author

bf4 commented Apr 25, 2024

#500 seems reasonable

bf4 added 10 commits July 16, 2025 19:45
- Add webrick and rackup gems for Ruby 3.3 server support
- Configure Capybara to use WEBrick with proper keyword arguments
- Add response_body_formatter to handle binary data correctly
- Improve StubApp request body parsing for different client types
- Make OpenApi::Node settings method public for test access
- Fix request body rewind compatibility across Rack versions
- Filter HTTP_VERSION header in env_to_headers (Rack 2.1.0 compatibility)
- Add proper response body encoding handling for ASCII-8BIT content
- Fix ApiFormatter event registration and notification handling
- Update pending test to work with RSpec 3.13 behavior
- Remove Sinatra dependency from test files (incompatible with Rack 2.1.0)
- Complete conversion of StubApp from Sinatra to plain Rack app
- Fix response_body_formatter to return proper format for binary data
- Update test configuration to use StubApp instances
Use anonymous classes instead of RSpec::Core::ExampleGroup.describe()
to create example groups for formatter testing. This prevents RSpec 3.5+
from automatically registering and executing these test groups, which
was causing false test failures.
bf4 added 6 commits July 24, 2025 09:59
Changed sinatra dependency from unversioned to "~> 2.0" to ensure
compatibility with Rack 2.1.0. Sinatra 1.x requires Rack ~> 1.5
which conflicts with Rack 2.1.0, causing cucumber tests to fail.
When parameters or attributes are defined without explicit descriptions,
the DSL auto-generates humanized descriptions (e.g., "option" -> "Option").
This change ensures these auto-generated descriptions are not included
in the API Blueprint output, providing cleaner documentation.

- Added humanize check to description_blank? method
- Updated RSpec tests to expect nil for auto-generated descriptions
- Fixes failing cucumber test for API Blueprint documentation
- Use Bearer token instead of MAC token (MAC support removed from rack-oauth2)
- Add defensive checks for response methods (headers, status, content_type)
- Add newline to JSON formatter output
- Skip adding nil response bodies to OpenAPI examples

Fixes failing cucumber tests for oauth2_mac_client
- Add response body examples to PUT 200 response
- Fix parameter description formatting (capitalize "Two level arr")
- Update JSON formatting to match pretty_generate output

The test now expects the actual response examples that are generated
when the PUT endpoint returns the request body.
super

output.puts " #{@example_group.description}"
output.puts " #{notification.group.description}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👀

@bf4 bf4 merged commit 0c9692a into master Jul 24, 2025
24 checks passed
@bf4 bf4 deleted the add_ruby_33 branch July 24, 2025 16:39
@bf4
Copy link
Contributor Author

bf4 commented Jul 24, 2025

Tested against my own application

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.

2 participants