Fixes Indentation

This commit is contained in:
Muhammad Nawzad 2023-11-16 14:36:12 +03:00
parent c4a2af54e7
commit f95b047efe
No known key found for this signature in database
GPG Key ID: B954B6AAE33940B2

View File

@ -12,36 +12,35 @@ require_relative 'schemable/request_schema_generator'
# It includes classes for generating attribute, relationship, included, response, and request schemas. # It includes classes for generating attribute, relationship, included, response, and request schemas.
# It also provides a configuration class for setting up the module's behavior. # It also provides a configuration class for setting up the module's behavior.
# #
# @example: # @example
# The following example shows how to use the Schemable module to generate a schema for a Comment model. # The following example shows how to use the Schemable module to generate a schema for a Comment model.
# #
# # config/initializers/schemable.rb # # config/initializers/schemable.rb
# Schemable.configure do |config| # Schemable.configure do |config|
# #... chosen configuration options ... # #... chosen configuration options ...
# end # end
# #
# # lib/swagger/definitions/comment.rb # # lib/swagger/definitions/comment.rb
# class Swagger::Definitions::Comment < Schemable::Definition; end # class Swagger::Definitions::Comment < Schemable::Definition; end
# #
# # whenever you need to generate the schema for a Comment model. # # whenever you need to generate the schema for a Comment model.
# # i.e. in RSwag's swagger_helper.rb # # i.e. in RSwag's swagger_helper.rb
# #
# # spec/swagger_helper.rb # # spec/swagger_helper.rb
# # ...
# RSpec.configure do |config|
# # ... # # ...
# RSpec.configure do |config|
# #
# config.swagger_docs = { # config.swagger_docs = {
# # ... # # ...
# components: { # components: {
# # ... # # ...
# schemas: Swagger::Definitions::Comment.generate.flatten.reduce({}, :merge) # schemas: Swagger::Definitions::Comment.generate.flatten.reduce({}, :merge)
# # ... # # ...
# } # }
# # ... # # ...
# } # }
# # ... # # ...
# end # end
# #
# @see Schemable::Definition # @see Schemable::Definition
# @see Schemable::Configuration # @see Schemable::Configuration
@ -67,4 +66,4 @@ module Schemable
yield(@configuration) if block_given? yield(@configuration) if block_given?
end end
end end
end end