happypdf_json_schema 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ = Changelog for happyPDF API Schema
2
+
3
+ A more detailed view of the changes can be found in the [commit messages](https://github.com/happypdf/happypdf_json_schema/commits/)
4
+
5
+
6
+ 2013-10
7
+
8
+ * add pdf resources
9
+ * refactor pdt, page resources
10
+
11
+ 2012-12
12
+
13
+ * initial version
@@ -1,6 +1,6 @@
1
- = HappyPDF API Schema
1
+ # HappyPDF API Schema
2
2
 
3
- {<img src="https://secure.travis-ci.org/happypdf/happypdf_json_schema.png?branch=master" alt="Build Status" />}[http://travis-ci.org/happypdf/happypdf_json_schema]
3
+ [<img src="https://secure.travis-ci.org/happypdf/happypdf_json_schema.png?branch=master" alt="Build Status" />](http://travis-ci.org/happypdf/happypdf_json_schema)
4
4
 
5
5
  Our API (objects,resources) is described with JSON Schema (http://json-schema.org).
6
6
  Each Object has its own description, with those top-level keys:
@@ -11,36 +11,35 @@ Each Object has its own description, with those top-level keys:
11
11
  "links": [ .. ] // CRUD actions, relationships to other resources
12
12
  }
13
13
 
14
- Look into the /json/ folder for the resources schema-files
14
+ Look into the /schema/ folder for the resources schema-files
15
15
  For ruby pirates this project is available as gem. It provides some utility
16
16
  methods to read the schema files and convert objects to their schema notation.
17
- See {/lib/happypdf/schema.rb}[https://github.com/happypdf/happypdf_json_schema/blob/master/lib/happypdf/schema.rb]
17
+ See [/lib/happypdf/schema.rb](https://github.com/happypdf/happypdf_json_schema/blob/master/lib/happypdf/schema.rb)
18
18
 
19
19
  Other languages should take advantage of the raw json files.
20
20
 
21
- == Field types & formats
21
+ ## Field types & formats
22
22
 
23
23
  Most of the fields are of type 'string'. Their format(espacially date fields)
24
- is casted on our side. We try to go with the {formats}[http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23] and {types}[http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1] defined by JSON-Schema
24
+ is casted on our side. We try to go with the [formats](http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23) and [types])http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1) defined by JSON-Schema
25
25
 
26
26
  All text MUST be UTF-8 encoded.
27
27
 
28
- *Text-Format* length varies, between ~16,000 to 65.535, with the occurence of non-ASCII Characters {see this post on stackoverflow}[http://stackoverflow.com/questions/4420164/how-much-utf-8-text-fits-in-a-mysql-text-field]
28
+ *Text-Format* length varies, between ~16,000 to 65.535, with the occurence of non-ASCII Characters [see this post on stackoverflow](http://stackoverflow.com/questions/4420164/how-much-utf-8-text-fits-in-a-mysql-text-field)
29
29
 
30
30
 
31
- == Install
31
+ ## Install
32
32
 
33
33
  gem install happypdf_json_schema
34
34
 
35
- == Test
35
+ ## Test
36
36
 
37
- Tested with {travis-ci}[http://travis-ci.org/happypdf/happypdf_json_schema], but of
37
+ Tested with [travis-ci](http://travis-ci.org/happypdf/happypdf_json_schema), but of
38
38
  course you can run them too. Install required gems with bundler and go for it:
39
- # git clone
40
- bundle install
41
- rake spec
42
39
 
40
+ # git clone
41
+ bundle install
42
+ rake spec
43
43
 
44
- == ToDo:
45
44
 
46
45
  Copyright (c) 2012-2013 Georg Leciejewski, released under the MIT license
@@ -12,7 +12,6 @@ Besides ruby users can use a small lib with utility methods to load and test the
12
12
  s.authors = ['Georg Leciejewski']
13
13
  s.email = %q{gl@happypdf.com}
14
14
  s.homepage = %q{http://github.com/happypdf/happypdf_json_schema}
15
- s.extra_rdoc_files = ['README.rdoc']
16
15
  s.executables = nil
17
16
  s.files = `git ls-files`.split("\n").reject{|i| i[/^docs\//] }
18
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -20,8 +19,8 @@ Besides ruby users can use a small lib with utility methods to load and test the
20
19
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
21
20
  s.require_paths = ['lib']
22
21
 
23
- s.add_development_dependency 'rdoc'
24
22
  s.add_development_dependency 'rspec'
23
+ s.add_development_dependency 'activesupport'
25
24
  s.add_development_dependency 'json_schema_tools'
26
25
  s.add_development_dependency 'rake', '>= 0.9.2'
27
26
 
@@ -1,5 +1,5 @@
1
1
  module HappyPdf
2
2
  class Schema
3
- VERSION='0.1.2'
3
+ VERSION='0.1.3'
4
4
  end
5
5
  end
data/schema/v1.0/pdf.json CHANGED
@@ -19,6 +19,11 @@
19
19
  "description": "PDF Template id, used to create this PDF.",
20
20
  "type": "integer"
21
21
  },
22
+ "public_id": {
23
+ "description": "Unique ID to be used in public URL e.g to get the screenshot image of a page.",
24
+ "readonly": true,
25
+ "type": "string"
26
+ },
22
27
  "user_id": {
23
28
  "description": "User who created the object",
24
29
  "type": "integer"
@@ -29,11 +34,6 @@
29
34
  "type": "string",
30
35
  "format": "date-time"
31
36
  },
32
- "md5": {
33
- "description": "MD5 hash created from pdf string.",
34
- "type": "string",
35
- "maxlength": 40
36
- },
37
37
  "account_id": {
38
38
  "description": "Account this objects belongs to.",
39
39
  "type": "integer"
data/schema/v1.0/pdt.json CHANGED
@@ -13,12 +13,12 @@
13
13
  "name": {
14
14
  "description": "Name shown in interface",
15
15
  "type": "string",
16
- "maxlength": 60
16
+ "maxlength": 128
17
17
  },
18
- "file": {
18
+ "filename": {
19
19
  "description": "Filename",
20
20
  "type": "string",
21
- "maxlength": 60
21
+ "maxlength": 128
22
22
  },
23
23
  "description": {
24
24
  "description": "A description of the template",
@@ -65,7 +65,7 @@
65
65
  "type": "integer"
66
66
  },
67
67
  "pages": {
68
- "description": "Pages of the doc.",
68
+ "description": "Pages of the template.",
69
69
  "type": "array",
70
70
  "properties":{"$ref":"./page.json#properties"}
71
71
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: happypdf_json_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ cert_chain: []
12
12
  date: 2013-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rdoc
15
+ name: rspec
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
@@ -28,7 +28,7 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
- name: rspec
31
+ name: activesupport
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
@@ -83,14 +83,13 @@ description: ! 'happyPDF JSON Schema describes our PDF API in terms of available
83
83
  email: gl@happypdf.com
84
84
  executables: []
85
85
  extensions: []
86
- extra_rdoc_files:
87
- - README.rdoc
86
+ extra_rdoc_files: []
88
87
  files:
89
88
  - .gitignore
90
89
  - .travis.yml
91
- - CHANGELOG.rdoc
90
+ - CHANGELOG.md
92
91
  - Gemfile
93
- - README.rdoc
92
+ - README.md
94
93
  - Rakefile
95
94
  - happypdf_json_schema.gemspec
96
95
  - lib/happypdf/schema.rb
@@ -119,6 +118,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
118
  - - ! '>='
120
119
  - !ruby/object:Gem::Version
121
120
  version: '0'
121
+ segments:
122
+ - 0
123
+ hash: -1543727035472563446
122
124
  required_rubygems_version: !ruby/object:Gem::Requirement
123
125
  none: false
124
126
  requirements:
@@ -127,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
129
  version: '0'
128
130
  requirements: []
129
131
  rubyforge_project:
130
- rubygems_version: 1.8.24
132
+ rubygems_version: 1.8.25
131
133
  signing_key:
132
134
  specification_version: 3
133
135
  summary: happyPDF API - JSON Schema
data/CHANGELOG.rdoc DELETED
@@ -1,7 +0,0 @@
1
- = Changelog for happyPDF API Schema
2
-
3
- A more detailed view of the changes can be found in the {commit messages}[https://github.com/happypdf/happypdf_json_schema/commits/]
4
-
5
- 2012-12
6
-
7
- * initial version