app/representers/openstax/accounts/api/v1/account_representer.rb in openstax_accounts-6.4.0 vs app/representers/openstax/accounts/api/v1/account_representer.rb in openstax_accounts-6.4.1

- old
+ new

@@ -7,29 +7,53 @@ module OpenStax module Accounts module Api module V1 class AccountRepresenter < Roar::Decorator + + # This representer is used to communicate with Accounts + # and so must allow read/write on all properties + include Roar::JSON property :openstax_uid, as: :id, - type: Integer + type: Integer, + schema_info: { + description: "The account's unique ID number", + required: true + } property :username, - type: String + type: String, + schema_info: { + description: "The account's unique username (case insensitive)", + required: true + } property :first_name, - type: String + type: String, + schema_info: { + description: "The user's first name" + } property :last_name, - type: String + type: String, + schema_info: { + description: "The user's last name" + } property :full_name, - type: String + type: String, + schema_info: { + description: "The user's full name" + } property :title, - type: String + type: String, + schema_info: { + description: "The user's title" + } end end end end