xing-framework 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/default_configuration/base_app/API_DOC/README +23 -0
- data/default_configuration/base_app/API_DOC/admin-menus +167 -0
- data/default_configuration/base_app/API_DOC/admin-pages +173 -0
- data/default_configuration/base_app/API_DOC/content-block +10 -0
- data/default_configuration/base_app/API_DOC/navigation +54 -0
- data/default_configuration/base_app/API_DOC/page +38 -0
- data/default_configuration/base_app/CHANGELOG.md +122 -0
- data/default_configuration/base_app/Capfile +26 -0
- data/default_configuration/base_app/Gemfile +7 -0
- data/default_configuration/base_app/Gemfile.lock +155 -0
- data/default_configuration/base_app/README.md +24 -0
- data/default_configuration/base_app/Rakefile +25 -0
- data/default_configuration/base_app/backend/Gemfile +45 -0
- data/default_configuration/base_app/backend/Gemfile.lock +292 -0
- data/default_configuration/base_app/backend/README +12 -0
- data/default_configuration/base_app/backend/Rakefile +10 -0
- data/default_configuration/base_app/backend/app/controllers/application_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/confirmations_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/passwords_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/registrations_controller.rb +15 -0
- data/default_configuration/base_app/backend/app/models/ability.rb +13 -0
- data/default_configuration/base_app/backend/app/models/role/admin.rb +8 -0
- data/default_configuration/base_app/backend/app/models/user.rb +43 -0
- data/default_configuration/base_app/backend/autotest/discover.rb +2 -0
- data/default_configuration/base_app/backend/bin/bundle +3 -0
- data/default_configuration/base_app/backend/bin/rails +4 -0
- data/default_configuration/base_app/backend/bin/rake +4 -0
- data/default_configuration/base_app/backend/config.ru +6 -0
- data/default_configuration/base_app/backend/config/application.rb +71 -0
- data/default_configuration/base_app/backend/config/boot.rb +4 -0
- data/default_configuration/base_app/backend/config/database.yml.ci +9 -0
- data/default_configuration/base_app/backend/config/database.yml.example +22 -0
- data/default_configuration/base_app/backend/config/environment.rb +5 -0
- data/default_configuration/base_app/backend/config/environments/development.rb +45 -0
- data/default_configuration/base_app/backend/config/environments/production.rb +78 -0
- data/default_configuration/base_app/backend/config/environments/staging.rb +48 -0
- data/default_configuration/base_app/backend/config/environments/test.rb +47 -0
- data/default_configuration/base_app/backend/config/initializers/assets.rb +8 -0
- data/default_configuration/base_app/backend/config/initializers/backtrace_silencers.rb +7 -0
- data/default_configuration/base_app/backend/config/initializers/constants.rb +1 -0
- data/default_configuration/base_app/backend/config/initializers/cookies_serializer.rb +3 -0
- data/default_configuration/base_app/backend/config/initializers/devise.rb +241 -0
- data/default_configuration/base_app/backend/config/initializers/devise_token_auth.rb +22 -0
- data/default_configuration/base_app/backend/config/initializers/filter_parameter_logging.rb +4 -0
- data/default_configuration/base_app/backend/config/initializers/inflections.rb +16 -0
- data/default_configuration/base_app/backend/config/initializers/mime_types.rb +4 -0
- data/default_configuration/base_app/backend/config/initializers/session_store.rb +3 -0
- data/default_configuration/base_app/backend/config/initializers/smtp.rb +25 -0
- data/default_configuration/base_app/backend/config/initializers/time_formats.rb +12 -0
- data/default_configuration/base_app/backend/config/initializers/wrap_parameters.rb +14 -0
- data/default_configuration/base_app/backend/config/locales/en.yml +23 -0
- data/default_configuration/base_app/backend/config/locales/json.yml +29 -0
- data/default_configuration/base_app/backend/config/routes.rb +33 -0
- data/default_configuration/base_app/backend/config/secrets.yml.ci +22 -0
- data/default_configuration/base_app/backend/config/secrets.yml.example +57 -0
- data/default_configuration/base_app/backend/config/sidekiq.yml +4 -0
- data/default_configuration/base_app/backend/db/sample_data/users.rake +10 -0
- data/default_configuration/base_app/backend/db/seeds.rb +14 -0
- data/default_configuration/base_app/backend/lib/static-app.rb +15 -0
- data/default_configuration/base_app/backend/public/404.html +26 -0
- data/default_configuration/base_app/backend/public/422.html +26 -0
- data/default_configuration/base_app/backend/public/500.html +26 -0
- data/default_configuration/base_app/backend/public/favicon.ico +0 -0
- data/default_configuration/base_app/backend/public/index.html +0 -0
- data/default_configuration/base_app/backend/public/robots.txt +5 -0
- data/default_configuration/base_app/backend/script/rails +6 -0
- data/default_configuration/base_app/backend/spec/factories/user_sessions_factory.rb +6 -0
- data/default_configuration/base_app/backend/spec/factories/users_factory.rb +35 -0
- data/default_configuration/base_app/backend/spec/features/user_sends_reset_password_email_spec.rb +30 -0
- data/default_configuration/base_app/backend/spec/features/user_signs_up_spec.rb +32 -0
- data/default_configuration/base_app/backend/spec/models/role/admin_spec.rb +12 -0
- data/default_configuration/base_app/backend/spec/models/role_spec.rb +48 -0
- data/default_configuration/base_app/backend/spec/models/user_spec.rb +59 -0
- data/default_configuration/base_app/backend/spec/requests/resources_index_spec.rb +22 -0
- data/default_configuration/base_app/backend/spec/spec_helper.rb +65 -0
- data/default_configuration/base_app/backend/spec/support/devise_helper.rb +78 -0
- data/default_configuration/base_app/backend/spec/support/log_tests.rb +5 -0
- data/default_configuration/base_app/backend/spec/support/session_helpers.rb +67 -0
- data/default_configuration/base_app/backend/spec/tasks/sample_data_rake_spec.rb +17 -0
- data/default_configuration/base_app/backend/static-app.ru +3 -0
- data/default_configuration/base_app/codeclimate.yml +7 -0
- data/default_configuration/base_app/config/compass.rb +21 -0
- data/default_configuration/base_app/config/deploy.rb +157 -0
- data/default_configuration/base_app/config/deploy/bundle-config +4 -0
- data/default_configuration/base_app/config/deploy/production.rb +7 -0
- data/default_configuration/base_app/config/deploy/staging.rb +6 -0
- data/default_configuration/base_app/doc/01_fail_resources.txt +173 -0
- data/default_configuration/base_app/doc/02_fail_auth.txt +165 -0
- data/default_configuration/base_app/doc/03_fail_menus.txt +174 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/10.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/11.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/12.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/13.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/14.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/15.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/16.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menus.json +23 -0
- data/default_configuration/base_app/dummy-api/admin/menus/1.json +118 -0
- data/default_configuration/base_app/dummy-api/admin/menus/2.json +8 -0
- data/default_configuration/base_app/dummy-api/admin/pages.json +105 -0
- data/default_configuration/base_app/dummy-api/admin/pages/about_us.json +45 -0
- data/default_configuration/base_app/dummy-api/admin/pages/contact_us.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/gallery.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/home.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/homepage.json +18 -0
- data/default_configuration/base_app/dummy-api/admin/pages/links.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/newsletter.json +54 -0
- data/default_configuration/base_app/dummy-api/homepage.json +14 -0
- data/default_configuration/base_app/dummy-api/navigation/main.json +119 -0
- data/default_configuration/base_app/dummy-api/pages/about_us.json +41 -0
- data/default_configuration/base_app/dummy-api/pages/contact_us.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/gallery.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/home.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/homepage.json +14 -0
- data/default_configuration/base_app/dummy-api/pages/links.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/newsletter.json +50 -0
- data/default_configuration/base_app/dump.rdb +0 -0
- data/default_configuration/base_app/example-lrd-dev-tmux.conf +17 -0
- data/default_configuration/base_app/frontend/CHANGELOG.md +125 -0
- data/default_configuration/base_app/frontend/Gemfile +5 -0
- data/default_configuration/base_app/frontend/Gemfile.lock +34 -0
- data/default_configuration/base_app/frontend/Gruntfile.js +3 -0
- data/default_configuration/base_app/frontend/LICENSE +19 -0
- data/default_configuration/base_app/frontend/README.md +5 -0
- data/default_configuration/base_app/frontend/bin/index.html +0 -0
- data/default_configuration/base_app/frontend/build.config.js +110 -0
- data/default_configuration/base_app/frontend/changelog.tpl +23 -0
- data/default_configuration/base_app/frontend/config/compass.rb +33 -0
- data/default_configuration/base_app/frontend/config/environments/development.js +4 -0
- data/default_configuration/base_app/frontend/config/environments/integration.js +4 -0
- data/default_configuration/base_app/frontend/config/environments/production.js +3 -0
- data/default_configuration/base_app/frontend/config/environments/test.js +4 -0
- data/default_configuration/base_app/frontend/create +0 -0
- data/default_configuration/base_app/frontend/karma/karma-unit.tpl.js +80 -0
- data/default_configuration/base_app/frontend/module.prefix +1 -0
- data/default_configuration/base_app/frontend/module.suffix +1 -0
- data/default_configuration/base_app/frontend/npm-shrinkwrap.json +4334 -0
- data/default_configuration/base_app/frontend/package.json +75 -0
- data/default_configuration/base_app/frontend/sprockets/index.tpl.js +2 -0
- data/default_configuration/base_app/frontend/src/README.md +48 -0
- data/default_configuration/base_app/frontend/src/app/README.md +68 -0
- data/default_configuration/base_app/frontend/src/app/app.js +47 -0
- data/default_configuration/base_app/frontend/src/app/appConfig.js +19 -0
- data/default_configuration/base_app/frontend/src/app/auth/auth.js +66 -0
- data/default_configuration/base_app/frontend/src/app/auth/config.js +22 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations.js +8 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmationsStates.js +12 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request-success.tpl.html +3 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request.tpl.html +16 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update-success.tpl.html +3 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update.tpl.html +21 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords.js +11 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsControllers.js +47 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsStates.js +38 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.js +14 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.tpl.html +37 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsControllers.js +25 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsStates.js +18 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.js +18 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.tpl.html +25 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsControllers.js +26 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsStates.js +20 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage-show.tpl.html +2 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage.js +10 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage.tpl.html +13 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepageControllers.js +9 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepageStates.js +22 -0
- data/default_configuration/base_app/frontend/src/app/inner.tpl.html +16 -0
- data/default_configuration/base_app/frontend/src/app/root.tpl.html +2 -0
- data/default_configuration/base_app/frontend/src/app/rootController.js +8 -0
- data/default_configuration/base_app/frontend/src/app/rootStates.js +20 -0
- data/default_configuration/base_app/frontend/src/assets/README.md +4 -0
- data/default_configuration/base_app/frontend/src/assets/icons/alert.svg +1 -0
- data/default_configuration/base_app/frontend/src/common/README.md +19 -0
- data/default_configuration/base_app/frontend/src/common/components/OnLoginDirective/OnLoginDirective.js +17 -0
- data/default_configuration/base_app/frontend/src/common/components/adminOnly/admin-only.tpl.html +4 -0
- data/default_configuration/base_app/frontend/src/common/components/adminOnly/adminOnly.js +23 -0
- data/default_configuration/base_app/frontend/src/common/components/sessionLinks/session-links.tpl.html +5 -0
- data/default_configuration/base_app/frontend/src/common/components/sessionLinks/sessionLinks.js +25 -0
- data/default_configuration/base_app/frontend/src/common/components/signOut/signOut.js +19 -0
- data/default_configuration/base_app/frontend/src/common/config.js +27 -0
- data/default_configuration/base_app/frontend/src/index.html +86 -0
- data/default_configuration/base_app/frontend/src/styles/_constants.sass +14 -0
- data/default_configuration/base_app/frontend/src/styles/main.sass +52 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_footer.sass +18 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_forms.sass +9 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_layout.sass +17 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_navbar.sass +10 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_typography.sass +18 -0
- data/default_configuration/base_app/frontend/src/styles/states/_errorFallback.sass +7 -0
- data/default_configuration/base_app/frontend/src/styles/states/_root_homepage.sass +8 -0
- data/default_configuration/base_app/frontend/test-help/xpath.js +9 -0
- data/default_configuration/base_app/frontend/test/app.js +24 -0
- data/default_configuration/base_app/frontend/test/auth/confirmations/confirmationsStates.js +46 -0
- data/default_configuration/base_app/frontend/test/auth/passwords/passwordsControllers.js +193 -0
- data/default_configuration/base_app/frontend/test/auth/passwords/passwordsStates.js +108 -0
- data/default_configuration/base_app/frontend/test/auth/registrations/registrationsControllers.js +117 -0
- data/default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js +64 -0
- data/default_configuration/base_app/frontend/test/auth/sessions/sessionsControllers.js +95 -0
- data/default_configuration/base_app/frontend/test/auth/sessions/sessionsStates.js +67 -0
- data/default_configuration/base_app/frontend/test/specHelper.js +33 -0
- data/default_configuration/base_app/frontend/test/support/mockDirective.js +13 -0
- data/default_configuration/base_app/frontend/test/support/stateResolveFn.js +3 -0
- data/default_configuration/base_app/frontend/test/support/testStates.js +20 -0
- data/default_configuration/base_app/frontend/tools.md +223 -0
- data/default_configuration/base_app/lib/capistrano/tasks/sidekiq.rake +218 -0
- data/default_configuration/base_app/static-app.ru +3 -0
- data/default_configuration/base_app/tmux-windows +68 -0
- data/default_configuration/base_app/tmux-windows.txt +53 -0
- data/lib/xing/cli.rb +8 -3
- data/lib/xing/cli/generators/new_project.rb +48 -13
- metadata +219 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 879d64c43c902f12cb4d78e72dbabe7d4ce5e648
|
4
|
+
data.tar.gz: db30c463cf52332bdc71228345888239bbf730bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7eda3ea85360c6b40a0797741cc350c2b8b5e14909fdc29b903314a9e6f38d7053c5439f8418f61c30ea720f418e2bdf1ebab695346716b684f4921ca7567e2
|
7
|
+
data.tar.gz: 4ec5dba6a578d2e0dafae1bbc048242c79d6ec332371d363375cd0c227a3207a7d5711ee9b6b4cf570fcda6a84cd58d2aa10144297b5bd44fd8116ebe258a5c6
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
All requests and responses are JSON. Client should send Accept:
|
3
|
+
"application/json" on all requests, and Content-Type: "application/json" on
|
4
|
+
requests with bodies (i.e. POST, PUT).
|
5
|
+
|
6
|
+
OPEN QUESTIONS:
|
7
|
+
PATCH? Only makes sense if the body somehow represents a change rather than a replacement.
|
8
|
+
All link relations? Or just self-links and use resource embed for
|
9
|
+
relationships?
|
10
|
+
|
11
|
+
Server responses should represent resources as a JSON object with two fields:
|
12
|
+
`links` and `data`. Both fields should contain an object. The links object
|
13
|
+
should have fields equivalent to HTML "rel" attributes. Importantly the self
|
14
|
+
link, but we should define link types internal to the application.
|
15
|
+
|
16
|
+
The data object is more free form. Some commonality of fields is worthwhile,
|
17
|
+
but whatever most sensibly represents the resource is the best choice.
|
18
|
+
|
19
|
+
Where a resource refers to another, include a subset of the other resource in
|
20
|
+
the data object.
|
21
|
+
|
22
|
+
Examples: #with ruby style comments
|
23
|
+
|
@@ -0,0 +1,167 @@
|
|
1
|
+
# list of menus
|
2
|
+
# This is the serialized output of Menu.list (class method)
|
3
|
+
#
|
4
|
+
# GET /admin/menus
|
5
|
+
{
|
6
|
+
links; {
|
7
|
+
self: "/admin/menus"
|
8
|
+
},
|
9
|
+
data: [
|
10
|
+
{ links: {
|
11
|
+
self: 'admin/menus/:id1'
|
12
|
+
},
|
13
|
+
data: {
|
14
|
+
name: 'Menu 1'
|
15
|
+
}
|
16
|
+
},
|
17
|
+
{ links: {
|
18
|
+
self: 'admin/menus/:id2'
|
19
|
+
},
|
20
|
+
data: {
|
21
|
+
name: 'Menu 2'
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{ links: {
|
25
|
+
self: 'admin/menus/:id3'
|
26
|
+
},
|
27
|
+
data: {
|
28
|
+
name: 'Menu 3'
|
29
|
+
}
|
30
|
+
}
|
31
|
+
]
|
32
|
+
}
|
33
|
+
|
34
|
+
|
35
|
+
# GET /admin/menu/:id
|
36
|
+
#
|
37
|
+
# Just like /navigation/main but takes the ID of one of the menus returned
|
38
|
+
# in admin/menus, gives the full list *with* admin links for individual
|
39
|
+
# menu items
|
40
|
+
{
|
41
|
+
links: {
|
42
|
+
self: "/admin/menu/:id"
|
43
|
+
},
|
44
|
+
data: [
|
45
|
+
|
46
|
+
# a top-level menu item
|
47
|
+
{
|
48
|
+
links : {
|
49
|
+
self: 'admin/menu-item/:id'
|
50
|
+
}
|
51
|
+
data : {
|
52
|
+
name: "Services",
|
53
|
+
path: # IF type == 'raw url', this is included and contains the url
|
54
|
+
page: { links: { self: "pages/:url_slug", #IF type == 'page', this is the URL of the page resource
|
55
|
+
type: [ 'page' | 'raw_url' ]
|
56
|
+
children: [
|
57
|
+
|
58
|
+
# a sub-menu item under "Services", with a page link
|
59
|
+
{
|
60
|
+
links: {
|
61
|
+
self: 'admin/menu-item/:id'
|
62
|
+
},
|
63
|
+
data: {
|
64
|
+
type: 'page',
|
65
|
+
name: "Startup MVPs",
|
66
|
+
page: { links: { self: '/pages/startup-mvps' }} ,
|
67
|
+
# no children - key omitted
|
68
|
+
}
|
69
|
+
},
|
70
|
+
|
71
|
+
# a second sub-menu item under "Services", with a page link
|
72
|
+
{
|
73
|
+
links: {
|
74
|
+
self: 'admin/menu-item/:id'
|
75
|
+
},
|
76
|
+
data: {
|
77
|
+
type: 'page'
|
78
|
+
name: "Code Rescue",
|
79
|
+
page: { links: { self: '/pages/code-rescue' }} ,
|
80
|
+
# no children - key omitted
|
81
|
+
}
|
82
|
+
},
|
83
|
+
|
84
|
+
]
|
85
|
+
}
|
86
|
+
},
|
87
|
+
|
88
|
+
# a top-level menu item with an external link
|
89
|
+
{
|
90
|
+
links : {
|
91
|
+
self: 'admin/menu-item/:id'
|
92
|
+
}
|
93
|
+
data: {
|
94
|
+
type: 'raw_url',
|
95
|
+
name: "About Web Security",
|
96
|
+
path: 'https://www.owasp.org/index.php/Main_Page',
|
97
|
+
# no children - key omitted
|
98
|
+
}
|
99
|
+
}
|
100
|
+
]
|
101
|
+
}
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
# GET /admin/menu-items/:id
|
108
|
+
# For an item that liks to an external URL
|
109
|
+
{
|
110
|
+
links : {
|
111
|
+
self: 'admin/menu-items/:id'
|
112
|
+
}
|
113
|
+
data: {
|
114
|
+
type: 'raw_url',
|
115
|
+
name: 'Services',
|
116
|
+
path: 'https://www.owasp.org/index.php/Main_Page',
|
117
|
+
parent_id: <integer>
|
118
|
+
}
|
119
|
+
}
|
120
|
+
# GET /admin/menu-items/:id
|
121
|
+
# For an item that liks to a page
|
122
|
+
{
|
123
|
+
links : {
|
124
|
+
self: 'admin/menu-items/:id'
|
125
|
+
}
|
126
|
+
data: {
|
127
|
+
type: 'page',
|
128
|
+
name: 'Services',
|
129
|
+
page: { links: { self: '/pages/:url_slug' }},
|
130
|
+
page_id: <integer>,
|
131
|
+
parent_id: <integer>
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
#
|
136
|
+
# POST /admin/menu-items
|
137
|
+
#
|
138
|
+
|
139
|
+
{
|
140
|
+
# links omitted
|
141
|
+
|
142
|
+
data : {
|
143
|
+
name: "Services", # REQUIRED
|
144
|
+
path: '/services', # optional if links to page
|
145
|
+
page_url_slug: '/page_url_slug' # optional if links to external website
|
146
|
+
type: [ 'page' | 'raw_url' ] # REQUIRED
|
147
|
+
parent_id: <integer> # optional
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
151
|
+
#
|
152
|
+
# PUT /admin/menu-items/:id
|
153
|
+
#
|
154
|
+
|
155
|
+
{
|
156
|
+
# links omitted
|
157
|
+
|
158
|
+
data : {
|
159
|
+
name: "Services", # optional
|
160
|
+
path: '/services', # optional
|
161
|
+
page_url_slug: '/page_url_slug' # optional
|
162
|
+
type: [ 'page' | 'raw_url' ] # optional
|
163
|
+
parent_id: <integer> # optional
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# NOTE: public has no view of list of pages
|
2
|
+
# This endpoint will NOT include blog posts: this is the list
|
3
|
+
# of pages to appear in the "Edit Pages" tool for admin users.
|
4
|
+
#
|
5
|
+
# RFC: Is 'self' link the public view of the page, or the admin
|
6
|
+
# view of the page? I'd think the latter
|
7
|
+
#
|
8
|
+
# GET /admin/pages
|
9
|
+
{
|
10
|
+
links {
|
11
|
+
self: '/admin/pages'
|
12
|
+
},
|
13
|
+
data: [
|
14
|
+
{ links: {
|
15
|
+
self: '/admin/pages/:slug1'
|
16
|
+
public: '/pages/:slug1'
|
17
|
+
},
|
18
|
+
data: {
|
19
|
+
title: 'Page 1',
|
20
|
+
layout: "one_column",
|
21
|
+
url_slug: "url_slug",
|
22
|
+
published: [true | false],
|
23
|
+
publish_start: <date/time>,
|
24
|
+
publish_end: <date/time>
|
25
|
+
}
|
26
|
+
},
|
27
|
+
{ links: {
|
28
|
+
self: '/admin/pages/:slug2' ,
|
29
|
+
public: '/pages/:slug2'
|
30
|
+
},
|
31
|
+
data: {
|
32
|
+
title: 'Page 2'
|
33
|
+
layout: "one_column",
|
34
|
+
url_slug: "url_slug",
|
35
|
+
published: [true | false],
|
36
|
+
publish_start: <date/time>,
|
37
|
+
publish_end: <date/time>
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{ links: {
|
41
|
+
self: '/admin/pages/:slug3'
|
42
|
+
public: '/pages/:slug3'
|
43
|
+
},
|
44
|
+
data: {
|
45
|
+
title: 'Page 3',
|
46
|
+
layout: "two_column",
|
47
|
+
url_slug: "url_slug",
|
48
|
+
published: [true | false],
|
49
|
+
publish_start: <date/time>,
|
50
|
+
publish_end: <date/time>
|
51
|
+
}
|
52
|
+
}
|
53
|
+
]
|
54
|
+
}
|
55
|
+
|
56
|
+
# RFP: I think this one is ready to go.
|
57
|
+
#
|
58
|
+
# GET /admin/pages/:url_slug
|
59
|
+
{
|
60
|
+
links: {
|
61
|
+
self: "/admin/pages/:slug",
|
62
|
+
public: "/pages/:slug"
|
63
|
+
},
|
64
|
+
|
65
|
+
data: {
|
66
|
+
url_slug: 'some-url-slug',
|
67
|
+
title: "string",
|
68
|
+
keywords: "string",
|
69
|
+
description: "string",
|
70
|
+
layout: "one_column",
|
71
|
+
url_slug: "url_slug",
|
72
|
+
published: "boolean",
|
73
|
+
publish_start: "datetime",
|
74
|
+
publish_end: "datetime",
|
75
|
+
contents: {
|
76
|
+
main: {
|
77
|
+
links: { self: "/content-blocks/:id" }
|
78
|
+
data: {
|
79
|
+
content_type: 'text/html',
|
80
|
+
body: 'Four score and <em>seven</em> years'
|
81
|
+
}
|
82
|
+
},
|
83
|
+
headline: {
|
84
|
+
links: { self: "/content-blocks/:id" },
|
85
|
+
data: {
|
86
|
+
content_type: 'text/html',
|
87
|
+
body: 'The Gettysburg Address'
|
88
|
+
}
|
89
|
+
},
|
90
|
+
styles: {
|
91
|
+
links: { self: "/content-blocks/:id" },
|
92
|
+
data: {
|
93
|
+
content_type: 'text/css',
|
94
|
+
body: 'p { font-weight: bold; }'
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
|
102
|
+
# POST /admin/pages
|
103
|
+
# creates a page with the supplied content
|
104
|
+
{
|
105
|
+
# links omitted
|
106
|
+
data: {
|
107
|
+
url_slug: "string", # optional
|
108
|
+
title: "string", # REQUIRED
|
109
|
+
keywords: "string", # optional
|
110
|
+
description: "string", # optional
|
111
|
+
layout: "", # REQUIRED - options are an ENUM per project
|
112
|
+
|
113
|
+
published: <boolean>, # optional - default true
|
114
|
+
publish_start: <datetime>, # optional - default nil
|
115
|
+
publish_end: <datetime>, # optional - default nil
|
116
|
+
|
117
|
+
contents: {
|
118
|
+
main: {
|
119
|
+
data: {
|
120
|
+
# NOTE: content-type omitted because that's specified in the back-end
|
121
|
+
# specification for this Page layout
|
122
|
+
body: 'Four score and <em>seven</em> years'
|
123
|
+
}
|
124
|
+
},
|
125
|
+
headline: {
|
126
|
+
data: {
|
127
|
+
body: 'The Gettysburg Address'
|
128
|
+
}
|
129
|
+
},
|
130
|
+
styles: {
|
131
|
+
data: {
|
132
|
+
body: 'p { font-weight: bold; }'
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
# PUT /admin/pages/:url_slug
|
140
|
+
# exactly like POST except that all fields are now optional, existing
|
141
|
+
# values will be retained
|
142
|
+
{
|
143
|
+
# links omitted
|
144
|
+
data: {
|
145
|
+
url_slug: "string", # optional
|
146
|
+
title: "string", # optional
|
147
|
+
keywords: "string", # optional
|
148
|
+
description: "string", # optional
|
149
|
+
layout: "", # optional
|
150
|
+
|
151
|
+
published: <boolean>, # optional - default true
|
152
|
+
publish_start: <datetime>, # optional - default nil
|
153
|
+
publish_end: <datetime>, # optional - default nil
|
154
|
+
|
155
|
+
contents: {
|
156
|
+
main: {
|
157
|
+
data: {
|
158
|
+
body: 'Four score and <em>seven</em> years'
|
159
|
+
}
|
160
|
+
},
|
161
|
+
headline: {
|
162
|
+
data: {
|
163
|
+
body: 'The Gettysburg Address'
|
164
|
+
}
|
165
|
+
},
|
166
|
+
styles: {
|
167
|
+
data: {
|
168
|
+
body: 'p { font-weight: bold; }'
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
173
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# There is no POST or GET for content-block. They should be created and fetched via the page
|
2
|
+
# resource. However, in order to support in-line / AJAXY editing, the front-end may update
|
3
|
+
# an individual content block resource.
|
4
|
+
|
5
|
+
# PUT /admin/content-blocks/:id
|
6
|
+
{
|
7
|
+
data: {
|
8
|
+
body: "New value for this content block's body"
|
9
|
+
}
|
10
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
#GET /navigation/main:
|
4
|
+
{
|
5
|
+
links: {
|
6
|
+
self: "/navigation/main"
|
7
|
+
},
|
8
|
+
data: [
|
9
|
+
|
10
|
+
# a top-level menu item
|
11
|
+
{
|
12
|
+
links : {}
|
13
|
+
data : {
|
14
|
+
name: "Services",
|
15
|
+
url: 'services',
|
16
|
+
type: [ 'page' | 'raw_url' ]
|
17
|
+
children: [
|
18
|
+
|
19
|
+
# a sub-menu item under "Services"
|
20
|
+
{
|
21
|
+
links: {},
|
22
|
+
data: {
|
23
|
+
name: "Startup MVPs",
|
24
|
+
url: '/startup-mvps',
|
25
|
+
type: [ 'page' | 'raw_url' ],
|
26
|
+
# no children - key omitted
|
27
|
+
}
|
28
|
+
},
|
29
|
+
{
|
30
|
+
links: {},
|
31
|
+
data: {
|
32
|
+
name: "Code Rescue",
|
33
|
+
url: '/code-rescue'
|
34
|
+
type: [ 'page' | 'raw_url' ]
|
35
|
+
# no children - key omitted
|
36
|
+
}
|
37
|
+
},
|
38
|
+
|
39
|
+
]
|
40
|
+
}
|
41
|
+
},
|
42
|
+
|
43
|
+
# a top-level menu item with an external link
|
44
|
+
{
|
45
|
+
links : {}
|
46
|
+
data : {
|
47
|
+
name: "About Web Security",
|
48
|
+
url: 'https://www.owasp.org/index.php/Main_Page',
|
49
|
+
type: 'raw_url',
|
50
|
+
# no children - key ommitted
|
51
|
+
}
|
52
|
+
}
|
53
|
+
]
|
54
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
# an individual page
|
3
|
+
GET /pages/:slug
|
4
|
+
{
|
5
|
+
links: {
|
6
|
+
self: "/pages/:slug",
|
7
|
+
admin: "admin/pages/:slug"
|
8
|
+
},
|
9
|
+
data: {
|
10
|
+
title: "string",
|
11
|
+
keywords: "string",
|
12
|
+
description: "string",
|
13
|
+
layout: "one_column",
|
14
|
+
contents: {
|
15
|
+
main: {
|
16
|
+
links: { self: "/content-blocks/:id" }
|
17
|
+
data: {
|
18
|
+
content_type: 'text/html',
|
19
|
+
body: 'Four score and <em>seven</em> years'
|
20
|
+
}
|
21
|
+
},
|
22
|
+
headline: {
|
23
|
+
links: { self: "/content-blocks/:id" },
|
24
|
+
data: {
|
25
|
+
content_type: 'text/html',
|
26
|
+
body: 'The Gettysburg Address'
|
27
|
+
}
|
28
|
+
},
|
29
|
+
styles: {
|
30
|
+
links: { self: "/content-blocks/:id" },
|
31
|
+
data: {
|
32
|
+
content_type: 'text/css',
|
33
|
+
body: 'p { font-weight: bold; }'
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|