praxis 2.0.pre.6 → 2.0.pre.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +1 -3
- data/CHANGELOG.md +25 -0
- data/TODO.md +1 -4
- data/bin/praxis +67 -12
- data/lib/praxis.rb +10 -3
- data/lib/praxis/action_definition.rb +15 -13
- data/lib/praxis/action_definition/headers_dsl_compiler.rb +0 -7
- data/lib/praxis/api_general_info.rb +1 -1
- data/lib/praxis/application.rb +6 -2
- data/lib/praxis/blueprint.rb +357 -0
- data/lib/praxis/bootloader.rb +9 -3
- data/lib/praxis/bootloader_stages/environment.rb +16 -13
- data/lib/praxis/collection.rb +1 -11
- data/lib/praxis/config_hash.rb +44 -0
- data/lib/praxis/docs/{openapi → open_api}/info_object.rb +18 -10
- data/lib/praxis/docs/{openapi → open_api}/media_type_object.rb +0 -0
- data/lib/praxis/docs/{openapi → open_api}/operation_object.rb +0 -0
- data/lib/praxis/docs/{openapi → open_api}/parameter_object.rb +2 -2
- data/lib/praxis/docs/{openapi → open_api}/paths_object.rb +12 -15
- data/lib/praxis/docs/{openapi → open_api}/request_body_object.rb +0 -0
- data/lib/praxis/docs/{openapi → open_api}/response_object.rb +0 -0
- data/lib/praxis/docs/{openapi → open_api}/responses_object.rb +0 -0
- data/lib/praxis/docs/{openapi → open_api}/schema_object.rb +0 -0
- data/lib/praxis/docs/{openapi → open_api}/server_object.rb +0 -0
- data/lib/praxis/docs/{openapi → open_api}/tag_object.rb +0 -0
- data/lib/praxis/docs/open_api_generator.rb +91 -6
- data/lib/praxis/endpoint_definition.rb +273 -0
- data/lib/praxis/extensions/attribute_filtering/active_record_filter_query_builder.rb +57 -8
- data/lib/praxis/extensions/attribute_filtering/filtering_params.rb +3 -16
- data/lib/praxis/extensions/attribute_filtering/sequel_filter_query_builder.rb +20 -8
- data/lib/praxis/extensions/field_expansion.rb +3 -36
- data/lib/praxis/extensions/pagination.rb +5 -32
- data/lib/praxis/extensions/pagination/ordering_params.rb +5 -1
- data/lib/praxis/extensions/pagination/pagination_params.rb +10 -4
- data/lib/praxis/field_expander.rb +90 -0
- data/lib/praxis/finalizable.rb +34 -0
- data/lib/praxis/mapper/active_model_compat.rb +4 -0
- data/lib/praxis/mapper/resource.rb +18 -2
- data/lib/praxis/mapper/selector_generator.rb +2 -1
- data/lib/praxis/mapper/sequel_compat.rb +7 -0
- data/lib/praxis/media_type.rb +3 -68
- data/lib/praxis/plugin_concern.rb +1 -1
- data/lib/praxis/plugins/mapper_plugin.rb +24 -15
- data/lib/praxis/plugins/pagination_plugin.rb +34 -4
- data/lib/praxis/renderer.rb +88 -0
- data/lib/praxis/request.rb +1 -1
- data/lib/praxis/resource_definition.rb +2 -311
- data/lib/praxis/response_definition.rb +2 -10
- data/lib/praxis/response_template.rb +3 -3
- data/lib/praxis/router.rb +2 -2
- data/lib/praxis/routing_config.rb +1 -1
- data/lib/praxis/tasks/api_docs.rb +17 -64
- data/lib/praxis/tasks/routes.rb +2 -2
- data/lib/praxis/types/media_type_common.rb +1 -11
- data/lib/praxis/version.rb +1 -1
- data/praxis.gemspec +0 -1
- data/spec/functional_spec.rb +5 -9
- data/spec/praxis/action_definition_spec.rb +12 -20
- data/spec/praxis/blueprint_spec.rb +373 -0
- data/spec/praxis/bootloader_spec.rb +10 -2
- data/spec/praxis/collection_spec.rb +0 -13
- data/spec/praxis/config_hash_spec.rb +64 -0
- data/spec/praxis/{resource_definition_spec.rb → endpoint_definition_spec.rb} +37 -64
- data/spec/praxis/extensions/attribute_filtering/active_record_filter_query_builder_spec.rb +19 -8
- data/spec/praxis/extensions/attribute_filtering/filtering_params_spec.rb +106 -0
- data/spec/praxis/extensions/field_expansion_spec.rb +5 -24
- data/spec/praxis/extensions/field_selection/active_record_query_selector_spec.rb +1 -1
- data/spec/praxis/extensions/field_selection/sequel_query_selector_spec.rb +1 -1
- data/spec/praxis/extensions/support/spec_resources_active_model.rb +1 -1
- data/spec/praxis/field_expander_spec.rb +149 -0
- data/spec/praxis/mapper/selector_generator_spec.rb +1 -1
- data/spec/praxis/media_type_identifier_spec.rb +5 -4
- data/spec/praxis/media_type_spec.rb +4 -93
- data/spec/praxis/renderer_spec.rb +188 -0
- data/spec/praxis/response_definition_spec.rb +0 -31
- data/spec/praxis/response_spec.rb +1 -1
- data/spec/praxis/router_spec.rb +8 -8
- data/spec/praxis/routing_config_spec.rb +3 -3
- data/spec/spec_app/app/controllers/instances.rb +13 -7
- data/spec/spec_app/design/media_types/instance.rb +1 -19
- data/spec/spec_app/design/media_types/volume.rb +1 -1
- data/spec/spec_app/design/media_types/volume_snapshot.rb +2 -14
- data/spec/spec_app/design/resources/instances.rb +5 -8
- data/spec/spec_app/design/resources/volume_snapshots.rb +1 -1
- data/spec/spec_app/design/resources/volumes.rb +1 -1
- data/spec/support/spec_authorization_plugin.rb +1 -1
- data/spec/support/spec_blueprints.rb +72 -0
- data/spec/support/{spec_resource_definitions.rb → spec_endpoint_definitions.rb} +2 -2
- data/spec/support/spec_media_types.rb +6 -26
- data/tasks/thor/app.rb +8 -34
- data/tasks/thor/example.rb +51 -285
- data/tasks/thor/model.rb +40 -0
- data/tasks/thor/scaffold.rb +117 -0
- data/tasks/thor/templates/generator/empty_app/.gitignore +0 -1
- data/tasks/thor/templates/generator/empty_app/Gemfile +7 -23
- data/tasks/thor/templates/generator/empty_app/README.md +1 -1
- data/tasks/thor/templates/generator/empty_app/Rakefile +4 -13
- data/tasks/thor/templates/generator/empty_app/{design/response_templates → app/v1/resources}/.empty_directory +0 -0
- data/tasks/thor/templates/generator/empty_app/{design/response_templates → app/v1/resources}/.gitkeep +0 -0
- data/tasks/thor/templates/generator/empty_app/config/environment.rb +26 -17
- data/tasks/thor/templates/generator/empty_app/{design/v1/resources → config/initializers}/.empty_directory +0 -0
- data/tasks/thor/templates/generator/empty_app/{design/v1/resources → config/initializers}/.gitkeep +0 -0
- data/tasks/thor/templates/generator/empty_app/design/v1/endpoints/.empty_directory +0 -0
- data/tasks/thor/templates/generator/empty_app/design/v1/endpoints/.gitkeep +0 -0
- data/tasks/thor/templates/generator/empty_app/docs/.empty_directory +0 -0
- data/tasks/thor/templates/generator/empty_app/docs/.gitkeep +0 -0
- data/tasks/thor/templates/generator/empty_app/spec/spec_helper.rb +14 -9
- data/tasks/thor/templates/generator/example_app/.gitignore +1 -0
- data/tasks/thor/templates/generator/example_app/Gemfile +19 -0
- data/tasks/thor/templates/generator/example_app/Rakefile +61 -0
- data/tasks/thor/templates/generator/example_app/app/models/user.rb +6 -0
- data/tasks/thor/templates/generator/example_app/app/v1/concerns/controller_base.rb +24 -0
- data/tasks/thor/templates/generator/example_app/app/v1/controllers/users.rb +17 -0
- data/tasks/thor/templates/generator/example_app/app/v1/resources/base.rb +11 -0
- data/tasks/thor/templates/generator/example_app/app/v1/resources/user.rb +25 -0
- data/tasks/thor/templates/generator/example_app/config.ru +30 -0
- data/tasks/thor/templates/generator/example_app/config/environment.rb +41 -0
- data/tasks/thor/templates/generator/example_app/db/migrate/20201010101010_create_users_table.rb +12 -0
- data/tasks/thor/templates/generator/example_app/db/seeds.rb +6 -0
- data/tasks/thor/templates/generator/example_app/design/api.rb +18 -0
- data/tasks/thor/templates/generator/example_app/design/v1/endpoints/users.rb +37 -0
- data/tasks/thor/templates/generator/example_app/design/v1/media_types/user.rb +21 -0
- data/tasks/thor/templates/generator/example_app/spec/helpers/database_helper.rb +20 -0
- data/tasks/thor/templates/generator/example_app/spec/spec_helper.rb +42 -0
- data/tasks/thor/templates/generator/example_app/spec/v1/controllers/users_spec.rb +37 -0
- data/tasks/thor/templates/generator/scaffold/design/endpoints/collection.rb +98 -0
- data/tasks/thor/templates/generator/scaffold/design/media_types/item.rb +18 -0
- data/tasks/thor/templates/generator/scaffold/implementation/controllers/collection.rb +77 -0
- data/tasks/thor/templates/generator/scaffold/implementation/resources/base.rb +11 -0
- data/tasks/thor/templates/generator/scaffold/implementation/resources/item.rb +45 -0
- data/tasks/thor/templates/generator/scaffold/models/active_record.rb +6 -0
- data/tasks/thor/templates/generator/scaffold/models/sequel.rb +6 -0
- metadata +62 -136
- data/lib/api_browser/.bowerrc +0 -3
- data/lib/api_browser/.editorconfig +0 -21
- data/lib/api_browser/Gruntfile.js +0 -581
- data/lib/api_browser/app/index.html +0 -59
- data/lib/api_browser/app/js/app.js +0 -48
- data/lib/api_browser/app/js/controllers/action.js +0 -47
- data/lib/api_browser/app/js/controllers/controller.js +0 -10
- data/lib/api_browser/app/js/controllers/menu.js +0 -93
- data/lib/api_browser/app/js/controllers/trait.js +0 -10
- data/lib/api_browser/app/js/controllers/type.js +0 -24
- data/lib/api_browser/app/js/directives/attribute_description.js +0 -56
- data/lib/api_browser/app/js/directives/attribute_table.js +0 -28
- data/lib/api_browser/app/js/directives/conditional_requirements.js +0 -13
- data/lib/api_browser/app/js/directives/fixed_if_fits.js +0 -38
- data/lib/api_browser/app/js/directives/highlight.js +0 -14
- data/lib/api_browser/app/js/directives/menu_item.js +0 -59
- data/lib/api_browser/app/js/directives/no_container.js +0 -8
- data/lib/api_browser/app/js/directives/readable_list.js +0 -87
- data/lib/api_browser/app/js/directives/request_examples.js +0 -31
- data/lib/api_browser/app/js/directives/type_placeholder.js +0 -30
- data/lib/api_browser/app/js/directives/url.js +0 -15
- data/lib/api_browser/app/js/factories/Configuration.js +0 -12
- data/lib/api_browser/app/js/factories/Documentation.js +0 -61
- data/lib/api_browser/app/js/factories/Example.js +0 -51
- data/lib/api_browser/app/js/factories/PageInfo.js +0 -9
- data/lib/api_browser/app/js/factories/normalize_attributes.js +0 -20
- data/lib/api_browser/app/js/factories/prepare_template.js +0 -15
- data/lib/api_browser/app/js/factories/template_for.js +0 -128
- data/lib/api_browser/app/js/filters/attribute_name.js +0 -10
- data/lib/api_browser/app/js/filters/friendly_json.js +0 -5
- data/lib/api_browser/app/js/filters/has_requirement.js +0 -14
- data/lib/api_browser/app/js/filters/header_info.js +0 -9
- data/lib/api_browser/app/js/filters/is_empty.js +0 -8
- data/lib/api_browser/app/js/filters/markdown.js +0 -6
- data/lib/api_browser/app/js/filters/resource_name.js +0 -5
- data/lib/api_browser/app/js/filters/tag_requirement.js +0 -13
- data/lib/api_browser/app/sass/modules/_body.scss +0 -40
- data/lib/api_browser/app/sass/modules/_cloke.scss +0 -8
- data/lib/api_browser/app/sass/modules/_header.scss +0 -10
- data/lib/api_browser/app/sass/modules/_nav.scss +0 -7
- data/lib/api_browser/app/sass/modules/_sidebar.scss +0 -134
- data/lib/api_browser/app/sass/modules/_switch.scss +0 -55
- data/lib/api_browser/app/sass/modules/_table.scss +0 -13
- data/lib/api_browser/app/sass/praxis.scss +0 -70
- data/lib/api_browser/app/sass/variables/_bootstrap-variables.scss +0 -774
- data/lib/api_browser/app/views/action.html +0 -97
- data/lib/api_browser/app/views/builtin/field-selector.html +0 -24
- data/lib/api_browser/app/views/controller.html +0 -55
- data/lib/api_browser/app/views/directives/attribute_description.html +0 -2
- data/lib/api_browser/app/views/directives/attribute_description/default.html +0 -2
- data/lib/api_browser/app/views/directives/attribute_description/example.html +0 -13
- data/lib/api_browser/app/views/directives/attribute_description/headers.html +0 -8
- data/lib/api_browser/app/views/directives/attribute_description/member_options.html +0 -4
- data/lib/api_browser/app/views/directives/attribute_description/values.html +0 -14
- data/lib/api_browser/app/views/directives/attribute_table.html +0 -17
- data/lib/api_browser/app/views/directives/menu_item.html +0 -8
- data/lib/api_browser/app/views/directives/url.html +0 -3
- data/lib/api_browser/app/views/examples/general.html +0 -26
- data/lib/api_browser/app/views/home.html +0 -5
- data/lib/api_browser/app/views/layout.html +0 -8
- data/lib/api_browser/app/views/menu.html +0 -42
- data/lib/api_browser/app/views/navbar.html +0 -9
- data/lib/api_browser/app/views/trait.html +0 -13
- data/lib/api_browser/app/views/type.html +0 -6
- data/lib/api_browser/app/views/type/details.html +0 -33
- data/lib/api_browser/app/views/types/embedded/array.html +0 -2
- data/lib/api_browser/app/views/types/embedded/default.html +0 -12
- data/lib/api_browser/app/views/types/embedded/field-selector.html +0 -13
- data/lib/api_browser/app/views/types/embedded/links.html +0 -11
- data/lib/api_browser/app/views/types/embedded/requirements.html +0 -6
- data/lib/api_browser/app/views/types/embedded/single_req.html +0 -9
- data/lib/api_browser/app/views/types/embedded/struct.html +0 -14
- data/lib/api_browser/app/views/types/label/link.html +0 -1
- data/lib/api_browser/app/views/types/label/primitive.html +0 -1
- data/lib/api_browser/app/views/types/label/primitive_collection.html +0 -1
- data/lib/api_browser/app/views/types/label/type.html +0 -1
- data/lib/api_browser/app/views/types/label/type_collection.html +0 -1
- data/lib/api_browser/app/views/types/main/array.html +0 -22
- data/lib/api_browser/app/views/types/main/default.html +0 -23
- data/lib/api_browser/app/views/types/main/hash.html +0 -23
- data/lib/api_browser/app/views/types/standalone/array.html +0 -3
- data/lib/api_browser/app/views/types/standalone/default.html +0 -18
- data/lib/api_browser/app/views/types/standalone/struct.html +0 -2
- data/lib/api_browser/bower_template.json +0 -41
- data/lib/api_browser/package-lock.json +0 -7110
- data/lib/api_browser/package.json +0 -43
- data/lib/praxis/docs/generator.rb +0 -243
- data/lib/praxis/docs/link_builder.rb +0 -30
- data/lib/praxis/links.rb +0 -135
- data/lib/praxis/types/multipart.rb +0 -109
- data/spec/api_browser/directives/type_placeholder_spec.js +0 -134
- data/spec/api_browser/factories/configuration_spec.js +0 -32
- data/spec/api_browser/factories/documentation_spec.js +0 -100
- data/spec/api_browser/factories/normalize_attributes_spec.js +0 -92
- data/spec/api_browser/factories/template_for_spec.js +0 -67
- data/spec/api_browser/filters/attribute_name_spec.js +0 -23
- data/spec/praxis/types/multipart_spec.rb +0 -112
- data/tasks/thor/templates/generator/empty_app/.rspec +0 -1
- data/tasks/thor/templates/generator/empty_app/Guardfile +0 -3
- data/tasks/thor/templates/generator/empty_app/config/rainbows.rb +0 -57
- data/tasks/thor/templates/generator/empty_app/docs/app.js +0 -1
- data/tasks/thor/templates/generator/empty_app/docs/styles.scss +0 -3
@@ -1,97 +0,0 @@
|
|
1
|
-
<div ng-if="error" class="alert alert-danger">
|
2
|
-
<p>The requested action could not be found.</p>
|
3
|
-
</div>
|
4
|
-
<div ng-if="action">
|
5
|
-
<div class="row">
|
6
|
-
<div class="col-lg-12">
|
7
|
-
<h1>
|
8
|
-
<a ui-sref="root.controller({version: apiVersion, controller: controller.id})">{{controller.display_name}}</a> » {{ action.name }}
|
9
|
-
</h1>
|
10
|
-
<url action="action"></url>
|
11
|
-
<p ng-bind-html="action.description | markdown"></p>
|
12
|
-
<p class="traits" ng-if="action.traits.length > 0">
|
13
|
-
This action is
|
14
|
-
<readable-list repeat="trait in action.traits"><a ui-sref="root.trait({version: apiVersion, trait: trait})">{{trait}}</a></readable-list>.
|
15
|
-
</p>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="row" ng-if="action.headers.type.attributes">
|
20
|
-
<div class="col-lg-12">
|
21
|
-
<h2>Request Headers</h2>
|
22
|
-
<type-placeholder details="action.headers.type.attributes" type="action.headers.type" template="standalone"></type-placeholder>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<div class="row" ng-if="action.params.type.attributes">
|
27
|
-
<div class="col-lg-12">
|
28
|
-
<h2>Request Parameters</h2>
|
29
|
-
<type-placeholder details="action.params.type.attributes" type="action.params.type" template="standalone" parent-requirements="action.params.type.requirements"></type-placeholder>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
|
33
|
-
<div class="row" ng-if="action.payload.type">
|
34
|
-
<div class="col-lg-12">
|
35
|
-
<h2>Request Body</h2>
|
36
|
-
<type-placeholder type="action.payload.type" template="standalone" details="action.payload.type.attributes" parent-requirements="action.payload.type.requirements"></type-placeholder>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
|
40
|
-
<div class="row">
|
41
|
-
<div class="col-lg-12">
|
42
|
-
<h2>Request Example</h2>
|
43
|
-
<request-examples action="action" resource="controller" version="apiVersion"></request-examples>
|
44
|
-
</div>
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<div class="row" ng-if="hasResponses()">
|
48
|
-
<div class="col-lg-12">
|
49
|
-
<h2>Responses</h2>
|
50
|
-
<div class="panel panel-default" ng-repeat="response in responses">
|
51
|
-
<div class="panel-heading"><h4 class="panel-title">{{response.name}}</h4></div>
|
52
|
-
<div class="panel-body">
|
53
|
-
<div class="row">
|
54
|
-
<div ng-class="{'col-md-4': response.payload.examples, 'col-md-12': !response.payload.examples}">
|
55
|
-
<div ng-if="response.description && response.description != ''">
|
56
|
-
<h5>Description</h5>
|
57
|
-
<div ng-bind-html="response.description | markdown"></div>
|
58
|
-
</div>
|
59
|
-
<h5>Status: {{ response.status }}</h5>
|
60
|
-
<div ng-if="response.examples.json">
|
61
|
-
<h5>Content-Type</h5>
|
62
|
-
<p>{{ response.examples.json.content_type }}</p>
|
63
|
-
</div>
|
64
|
-
<div ng-if="response.location">
|
65
|
-
<h5>Location:</h5>
|
66
|
-
<p>{{response.location.value}} <em>({{response.location.type}})</em></p>
|
67
|
-
</div>
|
68
|
-
<div ng-hide="response.headers | isEmpty">
|
69
|
-
<h5>Headers:</h5>
|
70
|
-
<div ng-repeat="(hname, hinfo) in response.headers">
|
71
|
-
<p> {{hname}}: {{ hinfo | headerInfo }}</p>
|
72
|
-
</div>
|
73
|
-
</div>
|
74
|
-
<div ng-if="response.payload.id">
|
75
|
-
<h5>Media Type</h5>
|
76
|
-
<p><type-placeholder template="label" type="response.payload"></type-placeholder></p>
|
77
|
-
</div>
|
78
|
-
</div>
|
79
|
-
<div class="col-md-8">
|
80
|
-
<div ng-if="response.payload.examples">
|
81
|
-
<h5>Response Example</h5>
|
82
|
-
<tabset ng-if="numExamples > 1">
|
83
|
-
<tab ng-repeat="(type, example) in response.payload.examples" heading="{{type}}">
|
84
|
-
<pre>{{ example.body }}</pre>
|
85
|
-
</tab>
|
86
|
-
</tabset>
|
87
|
-
<div ng-if="response.numExamples == 1">
|
88
|
-
<pre ng-repeat="(type, example) in response.payload.examples">{{ example.body }}</pre>
|
89
|
-
</div>
|
90
|
-
</div>
|
91
|
-
</div>
|
92
|
-
</div>
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
</div>
|
97
|
-
</div>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<div class="row">
|
2
|
-
<div class="col-lg-12">
|
3
|
-
<h1 class="page-header">FieldSelector</h1>
|
4
|
-
|
5
|
-
<p>Field Selectors allow you to specify in a request exactly what data you
|
6
|
-
wish to recieve in the response. This allows the client to get an efficient
|
7
|
-
response with only the fields required.</p>
|
8
|
-
<p>The fields can come from the endpointʼs associated Schema, or from an
|
9
|
-
attribute exposed in any of the views of the resource. Multiple fields are
|
10
|
-
separated by commas.</p>
|
11
|
-
<p>You can also select properties from nested schemas from parent schema
|
12
|
-
using curly braces. For example <code>title,user{name,email}</code> would lead to a
|
13
|
-
response like this:</p>
|
14
|
-
<pre>{
|
15
|
-
"title": "Nice Blog Post",
|
16
|
-
"user": {
|
17
|
-
"name": "John Appleseed",
|
18
|
-
"email": "john@example.com"
|
19
|
-
}
|
20
|
-
}</pre>
|
21
|
-
<p>If you do not specify attributes of nested properties, the <code>default</code>
|
22
|
-
view will be used to render them.</p>
|
23
|
-
</div>
|
24
|
-
</div>
|
@@ -1,55 +0,0 @@
|
|
1
|
-
<div ng-if="error" class="alert alert-danger">
|
2
|
-
<p>The requested controller could not be found.</p>
|
3
|
-
</div>
|
4
|
-
<div ng-if="controller">
|
5
|
-
<div class="row">
|
6
|
-
<div class="col-lg-12">
|
7
|
-
<h1 class="page-header">
|
8
|
-
{{ controller.display_name || (controller.name | resourceName) }}
|
9
|
-
</h1>
|
10
|
-
|
11
|
-
<p ng-bind-html="controller.description | markdown"></p>
|
12
|
-
|
13
|
-
<p class="traits" ng-if="controller.traits.length > 0">
|
14
|
-
This resource is
|
15
|
-
<readable-list repeat="trait in controller.traits"><a ui-sref="root.trait({version: apiVersion, trait: trait})">{{trait}}</a></readable-list>.
|
16
|
-
</p>
|
17
|
-
</div>
|
18
|
-
</div>
|
19
|
-
<div class="row actions-overview" ng-if="controller.actions.length">
|
20
|
-
<div class="col-lg-12">
|
21
|
-
<h2>Actions</h2>
|
22
|
-
<div class="table-responsive">
|
23
|
-
<table class="table table-striped table-bordered">
|
24
|
-
<thead>
|
25
|
-
<tr>
|
26
|
-
<th>Name</th>
|
27
|
-
<th>Route</th>
|
28
|
-
<th>Description</th>
|
29
|
-
</tr>
|
30
|
-
</thead>
|
31
|
-
<tbody>
|
32
|
-
<tr ng-repeat="action in controller.actions">
|
33
|
-
<td class="action-overview-name">
|
34
|
-
<a ui-sref="root.action({action: action.name, controller: controllerName, version: apiVersion})">{{ action.name }}</a>
|
35
|
-
</td>
|
36
|
-
<td class="action-overview-url">
|
37
|
-
<url action="action"></url>
|
38
|
-
</td>
|
39
|
-
<td class="action-overview-description">
|
40
|
-
<p ng-bind-html="action.description | markdown"></p>
|
41
|
-
</td>
|
42
|
-
</tr>
|
43
|
-
</tbody>
|
44
|
-
</table>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
<div ng-if="controller.media_type && controller.media_type.family != 'string'" ng-controller="TypeCtrl">
|
49
|
-
<ng-include src="'views/type/details.html'" />
|
50
|
-
</div>
|
51
|
-
<div ng-if="controller.media_type && controller.media_type.family == 'string'">
|
52
|
-
<h2>Schema</h2>
|
53
|
-
<p ><b>Internet Media-type: {{ controller.media_type.identifier }}</b></p>
|
54
|
-
</div>
|
55
|
-
</div>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<dt ng-if="row.value.length < 50">Example</dt>
|
2
|
-
<dt ng-if="row.value.length >= 50">
|
3
|
-
Example (<a ng-init="row.isCollapsed = true" ng-click="row.isCollapsed = !row.isCollapsed">{{row.isCollapsed? 'show' : 'hide'}}</a>)
|
4
|
-
</dt>
|
5
|
-
</dt>
|
6
|
-
|
7
|
-
|
8
|
-
<dd ng-if="row.value.length <= 50">
|
9
|
-
<code ng-class="{hide: false}">{{row.value}}</code>
|
10
|
-
</dd>
|
11
|
-
<dd ng-if="row.value.length > 50">
|
12
|
-
<pre ng-class="{hide: row.isCollapsed}">{{row.value}}</pre>
|
13
|
-
</dd>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<dt ng-hide="row.value | isEmpty">{{row.name}}</dt>
|
2
|
-
<dd ng-hide="row.value | isEmpty">
|
3
|
-
<div ng-repeat="(k,v) in row.value">
|
4
|
-
<span>{{k}}:</span>
|
5
|
-
<span ng-if="v.value === true"><em>Any value</em></span>
|
6
|
-
<span ng-if="v.value !== true">{{v.value}}</span>
|
7
|
-
</div>
|
8
|
-
</dd>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<dt ng-if="row.value.length == 1">Value</dt>
|
2
|
-
<dt ng-if="row.value.length < 5 && row.value.length > 1">Possible values</dt>
|
3
|
-
<dt ng-if="row.value.length >= 5">
|
4
|
-
Possible values (<a ng-init="row.isCollapsed = true" ng-click="row.isCollapsed = !row.isCollapsed">{{row.isCollapsed? 'show' : 'hide'}}</a>)
|
5
|
-
</dt>
|
6
|
-
</dt>
|
7
|
-
|
8
|
-
<dd ng-if="row.value.length == 1"><code>{{row.value[0]}}</code> (this field will always hold this value)</dd>
|
9
|
-
<dd ng-if="row.value.length > 1">
|
10
|
-
<div ng-class="{hide: !row.isCollapsed || row.value.length < 5}">{{row.value.slice(0, 4).join(', ')}}, <a ng-init="row.isCollapsed = true" ng-click="row.isCollapsed = !row.isCollapsed">and {{row.value.length - 4}} more</a>.</div>
|
11
|
-
<ul ng-class="{hide: row.isCollapsed && row.value.length >= 5}">
|
12
|
-
<li ng-repeat="v in row.value"><code>{{v}}</code></li>
|
13
|
-
</ul>
|
14
|
-
</dd>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<div class="table-responsive">
|
2
|
-
<table class="table table-striped table-bordered">
|
3
|
-
<thead>
|
4
|
-
<tr>
|
5
|
-
<th>Attribute</th>
|
6
|
-
<th>Type</th>
|
7
|
-
<th>Description</th>
|
8
|
-
</tr>
|
9
|
-
</thead>
|
10
|
-
<tbody ng-repeat="g in groups">
|
11
|
-
<tr ng-if="g.name && g.attributes.length">
|
12
|
-
<th colspan="3">{{g.name}}</th>
|
13
|
-
</tr>
|
14
|
-
<tr type-placeholder ng-repeat="item in g.attributes" type="item.type" template="embedded" name="item.name" details="item" parent-requirements="parentRequirements"></tr>
|
15
|
-
</tbody>
|
16
|
-
</table>
|
17
|
-
</div>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<div class="menu-item" ng-if="shouldShow">
|
2
|
-
<a href="{{link.stateRef}}"
|
3
|
-
ng-class="{active: isActive, 'child-resource': link.parent, 'action': link.isAction, 'main': !link.isAction}">
|
4
|
-
{{ link.name }}
|
5
|
-
</a>
|
6
|
-
<menu-item ng-repeat="action in link.actions" link="action"></menu-item>
|
7
|
-
<menu-item ng-repeat="resource in link.childResources" link="resource"></menu-item>
|
8
|
-
</div>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<div ng-if="!action.payload.examples">
|
2
|
-
<h4>URL</h4>
|
3
|
-
<url action="action" example></url>
|
4
|
-
<div ng-if="action.headers.example">
|
5
|
-
<h4>Headers</h4>
|
6
|
-
<pre><span ng-repeat="(header, value) in action.headers.example">{{header}}: {{value}}
|
7
|
-
</span></pre>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
<div ng-if="action.payload.examples">
|
11
|
-
<h4>URL</h4>
|
12
|
-
<url action="action" example></url>
|
13
|
-
<h4>Encoding</h4>
|
14
|
-
<tabset type="pills">
|
15
|
-
<tab ng-repeat="(type, example) in action.payload.examples" heading="{{type}}">
|
16
|
-
<div ng-if="action.headers.example">
|
17
|
-
<h4>Headers</h4>
|
18
|
-
<pre><span ng-if="example.content_type">Content-Type: {{example.content_type}}
|
19
|
-
</span><span ng-repeat="(header, value) in action.headers.example">{{header}}: {{value}}
|
20
|
-
</span></pre>
|
21
|
-
</div>
|
22
|
-
<h4>Request body</h4>
|
23
|
-
<pre>{{ example.body }}</pre>
|
24
|
-
</tab>
|
25
|
-
</tabset>
|
26
|
-
</div>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<ng-include src="'views/navbar.html'"></ng-include>
|
2
|
-
|
3
|
-
<div class="container" ng-cloak>
|
4
|
-
<div class="row">
|
5
|
-
<div class="col-sm-4 col-md-3" ng-controller="MenuCtrl" ng-include="'views/menu.html'"></div>
|
6
|
-
<div class="col-sm-8 col-md-9" ui-view="" autoscroll="true"></div>
|
7
|
-
</div>
|
8
|
-
</div>
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<div class="sidebar fixed-if-fits hidden-print">
|
2
|
-
<div class="row">
|
3
|
-
<div class="col-sm-12">
|
4
|
-
<p>
|
5
|
-
<div ng-if="versions.length > 1" dropdown dropdown-append-to-body>
|
6
|
-
<button type="button" class="btn btn-success" dropdown-toggle ng-disabled="disabled">
|
7
|
-
{{:: versionLabel}}: {{selectedVersion}} <span class="caret"></span>
|
8
|
-
</button>
|
9
|
-
<ul class="dropdown-menu" role="menu">
|
10
|
-
<li ng-repeat="version in versions">
|
11
|
-
<a ng-click="select(version)" dropdown-toggle>{{version}}</a>
|
12
|
-
</li>
|
13
|
-
</ul>
|
14
|
-
</div>
|
15
|
-
<div ng-if="versions.length == 1" class="btn btn-success">
|
16
|
-
{{:: versionLabel}}: {{selectedVersion}}
|
17
|
-
</div>
|
18
|
-
</p>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
<div class="row">
|
22
|
-
<div class="col-sm-12">
|
23
|
-
<tabset justified="true" class="tab-list-group">
|
24
|
-
<tab heading="Resources" active="active.resources">
|
25
|
-
<div class="list-group">
|
26
|
-
<menu-item ng-repeat="link in availableResources() | orderBy: 'name'" link="link" toplevel="true"></menu-item>
|
27
|
-
</div>
|
28
|
-
</tab>
|
29
|
-
<tab heading="Schemas" active="active.schemas">
|
30
|
-
<div class="list-group">
|
31
|
-
<menu-item ng-repeat="link in availableSchemas() | orderBy: 'name'" link="link" toplevel="true"></menu-item>
|
32
|
-
</div>
|
33
|
-
</tab>
|
34
|
-
<tab heading="Traits" active="active.traits" ng-if="availableTraits().length > 0">
|
35
|
-
<div class="list-group">
|
36
|
-
<menu-item ng-repeat="link in availableTraits() | orderBy: 'name'" link="link" toplevel="true"></menu-item>
|
37
|
-
</div>
|
38
|
-
</tab>
|
39
|
-
</tabset>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
</div>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<div ng-if="error" class="alert alert-danger">
|
2
|
-
<p>The requested trait could not be found.</p>
|
3
|
-
</div>
|
4
|
-
<div ng-if="trait">
|
5
|
-
<div class="row">
|
6
|
-
<div class="col-lg-12">
|
7
|
-
<h1>
|
8
|
-
{{ traitName | resourceName }}
|
9
|
-
</h1>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
<div ng-if="trait.description" ng-bind-html="trait.description | markdown"></div>
|
13
|
-
</div>
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<div class="row" ng-if="type">
|
2
|
-
<div class="col-lg-12">
|
3
|
-
<div ng-if="type.attributes">
|
4
|
-
<h2>Schema</h2>
|
5
|
-
<p ng-if="type.identifier"><b>Media-type identifier: {{ type.identifier }}</b></p>
|
6
|
-
<div ng-if="type.description" ng-bind-html="type.description | markdown"></div>
|
7
|
-
|
8
|
-
<attribute-table attributes="type.attributes" parent-requirements="type.requirements"></attribute-table>
|
9
|
-
</div>
|
10
|
-
<div ng-if="type.attributes === undefined" type-placeholder type="type" template="standalone" name="type.name" details="type" parent-requirements="type.requirements"></div>
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
<div class="row" ng-if="views.length">
|
14
|
-
<div class="col-lg-12">
|
15
|
-
<h3>Available views</h3>
|
16
|
-
<tabset>
|
17
|
-
<tab ng-repeat="view in views" heading="{{view.name}}">
|
18
|
-
<div class="row">
|
19
|
-
<div class="col-md-4">
|
20
|
-
<h4>Attributes</h4>
|
21
|
-
<ul>
|
22
|
-
<li ng-repeat="(name,value) in view.attributes">{{name}} <span class="label label-default" ng-if="value.view">{{value.view}} view</span></li>
|
23
|
-
</ul>
|
24
|
-
</div>
|
25
|
-
<div class="col-md-8">
|
26
|
-
<h4>Example</h4>
|
27
|
-
<pre>{{view.example | friendlyJson}}</pre>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
</tab>
|
31
|
-
</tabset>
|
32
|
-
</div>
|
33
|
-
</div>
|
@@ -1,2 +0,0 @@
|
|
1
|
-
<tr ng-include="'views/types/embedded/default.html'" no-container parent-requirements="type.member_attributes.type.requirements"></tr>
|
2
|
-
<tr type-placeholder ng-repeat="(k,v) in type.member_attribute.type.attributes" type="v.type" template="embedded" name="'[].'+ name + '.' + k" details="v" parent-requirements="type.member_attributes.type.requirements"></tr>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<td>
|
3
|
-
<span ng-bind-html="name | attributeName"></span>
|
4
|
-
</td>
|
5
|
-
<td>
|
6
|
-
<type-placeholder template="label" type="type"></type-placeholder>
|
7
|
-
<span ng-bind-html="parentRequirements| hasRequirement:name | tagRequirement"></span>
|
8
|
-
</td>
|
9
|
-
<td>
|
10
|
-
<attribute-description attribute="details"></attribute-description>
|
11
|
-
</td>
|
12
|
-
</tr>
|