mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-22 22:26:41 +00:00
Fixes Indentation
This commit is contained in:
parent
c4a2af54e7
commit
f95b047efe
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user