Sha256: 9a9a2ab4ba5f831913b5916e23011558f8bcc31221aa3529705f1d0d7aec0c67

Contents?: true

Size: 742 Bytes

Versions: 5

Compression:

Stored size: 742 Bytes

Contents

# frozen_string_literal: true

class VolumeSnapshot < Praxis::MediaType
  identifier 'application/json'

  attributes do
    attribute :id, Integer
    attribute :name, String, regexp: /snapshot-(\w+)/, example: proc { "snapshot-#{Faker::Number.number(digits: 8) }" }
  end

  default_fieldset do
    attribute :id
    attribute :name
  end

  class CollectionSummary < Praxis::MediaType
    identifier 'application/json'

    attributes do
      attribute :name, String, regexp: /snapshots-(\w+)/, example: proc { "snapshot-#{Faker::Number.number(digits: 8) }" }
      attribute :size, Integer
      attribute :href, String
    end

    default_fieldset do
      attribute :name
      attribute :size
      attribute :href
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
praxis-2.0.0 spec/spec_app/design/media_types/volume_snapshot.rb
praxis-2.0.pre.40 spec/spec_app/design/media_types/volume_snapshot.rb
praxis-2.0.pre.39 spec/spec_app/design/media_types/volume_snapshot.rb
praxis-2.0.pre.38 spec/spec_app/design/media_types/volume_snapshot.rb
praxis-2.0.pre.37 spec/spec_app/design/media_types/volume_snapshot.rb