Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/rspec/openapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ module RSpec::OpenAPI
@comment = nil
@enable_example = true
@description_builder = -> (example) { example.description }
@application_version = '1.0.0'

class << self
attr_accessor :path, :comment, :enable_example, :description_builder
attr_accessor :path, :comment, :enable_example, :description_builder, :application_version
end
end
1 change: 1 addition & 0 deletions lib/rspec/openapi/default_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ def build(title)
openapi: '3.0.3',
info: {
title: title,
version: RSpec::OpenAPI.application_version
},
paths: {},
}.freeze
Expand Down
1 change: 1 addition & 0 deletions spec/rails/doc/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
openapi: 3.0.3
info:
title: rspec-openapi
version: 1.0.0
paths:
"/tables":
get:
Expand Down
1 change: 1 addition & 0 deletions spec/roda/doc/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
openapi: 3.0.3
info:
title: rspec-openapi
version: 1.0.0
paths:
"/roda":
post:
Expand Down