Sha256: 664059a5635082490716bf10d1b661f0148bca821b826c550cd7adc0b73fb098

Contents?: true

Size: 663 Bytes

Versions: 20

Compression:

Stored size: 663 Bytes

Contents

PersonOutputObject = SoberSwag::OutputObject.define do
  identifier 'Person'
  field :id, primitive(:Integer).meta(description: 'Unique ID')
  field :first_name, primitive(:String).meta(description: <<~MARKDOWN)
    This is the first name of a person.
    Note that you can't use this as a unique identifier, and you really should understand how names work before using this.
    [Falsehoods programmers believe about names](https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/)
    is a good thing to read!
  MARKDOWN
  field :last_name, primitive(:String)

  view :detail do
    field :posts, -> { PostOutputObject.array }
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
sober_swag-0.21.0 example/app/output_objects/person_output_object.rb
sober_swag-0.20.0 example/app/output_objects/person_output_object.rb
sober_swag-0.19.0 example/app/output_objects/person_output_object.rb
sober_swag-0.18.0 example/app/output_objects/person_output_object.rb
sober_swag-0.17.0 example/app/output_objects/person_output_object.rb
sober_swag-0.16.0 example/app/output_objects/person_output_object.rb
sober_swag-0.15.0 example/app/output_objects/person_output_object.rb
sober_swag-0.14.0 example/app/output_objects/person_output_object.rb
sober_swag-0.13.0 example/app/output_objects/person_output_object.rb
sober_swag-0.12.0 example/app/output_objects/person_output_object.rb
sober_swag-0.11.0 example/app/output_objects/person_output_object.rb
sober_swag-0.10.0 example/app/output_objects/person_output_object.rb
sober_swag-0.9.0 example/app/output_objects/person_output_object.rb
sober_swag-0.8.0 example/app/output_objects/person_output_object.rb
sober_swag-0.7.0 example/app/output_objects/person_output_object.rb
sober_swag-0.6.0 example/app/output_objects/person_output_object.rb
sober_swag-0.5.0 example/app/output_objects/person_output_object.rb
sober_swag-0.4.0 example/app/output_objects/person_output_object.rb
sober_swag-0.3.0 example/app/output_objects/person_output_object.rb
sober_swag-0.2.0 example/app/output_objects/person_output_object.rb