Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
Revert "Admin id to _id"
Browse files Browse the repository at this point in the history
This reverts commit 707aed4.
  • Loading branch information
radduccijc committed Apr 5, 2019
1 parent 707aed4 commit 664e36a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion jcapiv2/docs/Administrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_id** | **String** | | [optional]
**id** | **String** | | [optional]
**email** | **String** | | [optional]
**firstname** | **String** | | [optional]
**lastname** | **String** | | [optional]
Expand Down
14 changes: 7 additions & 7 deletions jcapiv2/lib/jcapiv2/models/administrator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
module JCAPIv2

class Administrator
attr_accessor :_id
attr_accessor :id

attr_accessor :email

Expand All @@ -31,7 +31,7 @@ class Administrator
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'_id' => :'_id',
:'id' => :'id',
:'email' => :'email',
:'firstname' => :'firstname',
:'lastname' => :'lastname',
Expand All @@ -43,7 +43,7 @@ def self.attribute_map
# Attribute type mapping.
def self.swagger_types
{
:'_id' => :'String',
:'id' => :'String',
:'email' => :'String',
:'firstname' => :'String',
:'lastname' => :'String',
Expand All @@ -60,8 +60,8 @@ def initialize(attributes = {})
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

if attributes.has_key?(:'_id')
self._id = attributes[:'_id']
if attributes.has_key?(:'id')
self.id = attributes[:'id']
end

if attributes.has_key?(:'email')
Expand Down Expand Up @@ -104,7 +104,7 @@ def valid?
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
_id == o._id &&
id == o.id &&
email == o.email &&
firstname == o.firstname &&
lastname == o.lastname &&
Expand All @@ -121,7 +121,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
[_id, email, firstname, lastname, enable_multi_factor, registered].hash
[id, email, firstname, lastname, enable_multi_factor, registered].hash
end

# Builds the object from hash
Expand Down
2 changes: 1 addition & 1 deletion jcapiv2/spec/models/administrator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
expect(@instance).to be_instance_of(JCAPIv2::Administrator)
end
end
describe 'test attribute "_id"' do
describe 'test attribute "id"' do
it 'should work' do
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
end
Expand Down

0 comments on commit 664e36a

Please sign in to comment.