Skip to content

Commit

Permalink
Merge pull request #61 from radify/develop
Browse files Browse the repository at this point in the history
Next release
  • Loading branch information
wms authored Mar 27, 2017
2 parents 5d68669 + eea5ea7 commit 831c9a3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
14 changes: 7 additions & 7 deletions integration-test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var expected = {
type: 'object',

properties: {
id: {type: 'integer', readOnly: true},
id: {type: 'number', readOnly: true},
username: {type: 'string'},
password: {type: 'string'},
created_at: {
Expand Down Expand Up @@ -52,7 +52,7 @@ var expected = {
type: 'object',
properties: {
id: {
type: 'integer',
type: 'number',
readOnly: true
},
title: {
Expand All @@ -74,7 +74,7 @@ var expected = {
format: 'date-time'
},
owner: {
type: 'integer'
type: 'number'
}
},
required: ['title', 'owner']
Expand All @@ -100,10 +100,10 @@ var expected = {
type: 'object',
properties: {
user_id: {
type: 'integer'
type: 'number'
},
task_id: {
type: 'integer'
type: 'number'
}
},
required: ['user_id', 'task_id']
Expand All @@ -130,13 +130,13 @@ var expected = {

properties: {
id: {
type: 'integer'
type: 'number'
},
username: {
type: 'string'
},
completed: {
type: 'integer'
type: 'number'
}
},

Expand Down
16 changes: 8 additions & 8 deletions spec/inspectors/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ describe('schema', () => {
minProperties: 1,
additionalProperties: false,
properties: {
milliseconds: {type: 'integer'},
seconds: {type: 'integer'},
minutes: {type: 'integer'},
hours: {type: 'integer'},
days: {type: 'integer'},
months: {type: 'ingeger'},
years: {type: 'integer'}
milliseconds: {type: 'number'},
seconds: {type: 'number'},
minutes: {type: 'number'},
hours: {type: 'number'},
days: {type: 'number'},
months: {type: 'number'},
years: {type: 'number'}
}
}
})
Expand All @@ -150,7 +150,7 @@ describe('schema', () => {

expect(result).toEqual({
id: {
type: 'integer',
type: 'number',
readOnly: true
}
});
Expand Down
26 changes: 13 additions & 13 deletions src/inspectors/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ export function properties(columns: Column[]): SchemaProperties {
*/
export function property(column: Column): SchemaProperties {
const TYPES:any = {
bigserial: {type: 'integer'},
bigserial: {type: 'number'},
boolean: {type: 'boolean'},
character: {type: 'string'},
bigint: {type: 'integer'},
integer: {type: 'integer'},
bigint: {type: 'number'},
integer: {type: 'number'},
json: {type: 'object'},
jsonb: {type: 'object'},
numeric: {type: 'number'},
real: {type: 'number'},
smallint: {type: 'integer'},
smallserial: {type: 'integer'},
serial: {type: 'integer'},
smallint: {type: 'number'},
smallserial: {type: 'number'},
serial: {type: 'number'},
text: {type: 'string'},

interval: {
Expand All @@ -116,13 +116,13 @@ export function property(column: Column): SchemaProperties {
minProperties: 1,
additionalProperties: false,
properties: {
milliseconds: {type: 'integer'},
seconds: {type: 'integer'},
minutes: {type: 'integer'},
hours: {type: 'integer'},
days: {type: 'integer'},
months: {type: 'ingeger'},
years: {type: 'integer'}
milliseconds: {type: 'number'},
seconds: {type: 'number'},
minutes: {type: 'number'},
hours: {type: 'number'},
days: {type: 'number'},
months: {type: 'number'},
years: {type: 'number'}
}
},

Expand Down

0 comments on commit 831c9a3

Please sign in to comment.