Skip to content

Commit 1ba3036

Browse files
authored
Merge pull request #119 from jacine/DRUP-816
[DRUP-816] Remove Swagger UI in favor of SmartDocs
2 parents 33c8549 + 5b31b72 commit 1ba3036

12 files changed

+47
-54
lines changed

apigee_devportal_kickstart.info.yml

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ install:
6666
- forum
6767
- paragraphs
6868
- pathauto
69-
- swagger_ui_formatter
7069

7170
# List any themes that should be installed as part of the profile installation.
7271
# Note that this will not set any theme as the default theme.

composer.json

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,6 @@
99
"drupal": {
1010
"type": "composer",
1111
"url": "https://packages.drupal.org/8"
12-
},
13-
"swagger-api/swagger-ui": {
14-
"type": "package",
15-
"package": {
16-
"name": "swagger-api/swagger-ui",
17-
"version": "3.22.0",
18-
"type": "drupal-library",
19-
"dist": {
20-
"url": "https://github.com/swagger-api/swagger-ui/archive/v3.22.0.zip",
21-
"type": "zip"
22-
},
23-
"require": {
24-
"composer/installers": "^1.2.0"
25-
}
26-
}
2712
}
2813
},
2914
"require": {
@@ -39,9 +24,7 @@
3924
"drupal/fontawesome": "^2.12",
4025
"drupal/paragraphs": "^1.6",
4126
"drupal/pathauto": "^1.3",
42-
"drupal/radix": "^4.3",
43-
"drupal/swagger_ui_formatter": "^2.2",
44-
"swagger-api/swagger-ui": "^3.21"
27+
"drupal/radix": "^4.3"
4528
},
4629
"require-dev": {
4730
"drush/drush": "~9",

config/install/core.entity_form_display.apidoc.apidoc.default.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,14 @@ dependencies:
77
module:
88
- apigee_api_catalog
99
- file
10+
- file_link
1011
- media_library
1112
- text
1213
id: apidoc.apidoc.default
1314
targetEntityType: apidoc
1415
bundle: apidoc
1516
mode: default
1617
content:
17-
api_product:
18-
type: entity_reference_autocomplete
19-
weight: 2
20-
region: content
21-
settings:
22-
match_operator: CONTAINS
23-
size: 60
24-
placeholder: ''
25-
third_party_settings: { }
2618
description:
2719
type: text_textarea
2820
weight: 1
@@ -43,7 +35,8 @@ content:
4335
field_image:
4436
type: media_library_widget
4537
weight: 7
46-
settings: { }
38+
settings:
39+
media_types: { }
4740
third_party_settings: { }
4841
region: content
4942
name:
@@ -57,9 +50,16 @@ content:
5750
spec:
5851
label: hidden
5952
type: file_generic
60-
weight: 3
6153
region: content
54+
weight: 26
6255
settings:
6356
progress_indicator: throbber
6457
third_party_settings: { }
58+
status:
59+
type: boolean_checkbox
60+
weight: 1
61+
region: content
62+
settings:
63+
display_label: true
64+
third_party_settings: { }
6565
hidden: { }

config/install/core.entity_view_display.apidoc.apidoc.card.yml

-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ content:
3838
link_to_entity: false
3939
third_party_settings: { }
4040
hidden:
41-
api_product: true
4241
field_categories: true
4342
spec: true

config/install/core.entity_view_display.apidoc.apidoc.default.yml

+2-17
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,19 @@ dependencies:
66
- field.field.apidoc.apidoc.field_image
77
module:
88
- apigee_api_catalog
9-
- swagger_ui_formatter
109
id: apidoc.apidoc.default
1110
targetEntityType: apidoc
1211
bundle: apidoc
1312
mode: default
1413
content:
1514
spec:
1615
label: hidden
17-
type: swagger_ui_file
16+
type: apigee_api_catalog_smartdocs
1817
weight: 0
1918
region: content
20-
settings:
21-
validator: default
22-
validator_url: ''
23-
doc_expansion: list
24-
show_top_bar: 0
25-
sort_tags_by_name: 0
26-
supported_submit_methods:
27-
get: 0
28-
put: 0
29-
post: 0
30-
delete: 0
31-
options: 0
32-
head: 0
33-
patch: 0
19+
settings: { }
3420
third_party_settings: { }
3521
hidden:
36-
api_product: true
3722
description: true
3823
field_categories: true
3924
field_image: true

modules/custom/apigee_kickstart_content/content/paragraph/133a8cb0-6813-4a2c-9f8a-a4c7a9109268.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
},
107107
"field_link": [
108108
{
109-
"uri": "internal:\/apidoc\/2",
109+
"uri": "internal:\/api\/2",
110110
"title": "View Documentation",
111111
"options": [],
112112
"lang": "en"
@@ -126,4 +126,4 @@
126126
"lang": "en"
127127
}
128128
]
129-
}
129+
}

modules/custom/apigee_kickstart_content/content/paragraph/338d65b4-8589-47bf-869e-63699ecdefea.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
},
107107
"field_link": [
108108
{
109-
"uri": "internal:\/apidoc\/1",
109+
"uri": "internal:\/api\/1",
110110
"title": "View Documentation",
111111
"options": [],
112112
"lang": "en"
@@ -126,4 +126,4 @@
126126
"lang": "en"
127127
}
128128
]
129-
}
129+
}

modules/custom/apigee_kickstart_content/content/paragraph/553bc28b-b818-4e1f-971d-647bb659c880.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
},
107107
"field_link": [
108108
{
109-
"uri": "internal:\/apidoc\/3",
109+
"uri": "internal:\/api\/3",
110110
"title": "View Documentation",
111111
"options": [],
112112
"lang": "en"
@@ -126,4 +126,4 @@
126126
"lang": "en"
127127
}
128128
]
129-
}
129+
}

themes/custom/apigee_kickstart/assets/css/apigee-kickstart.style.css

+5
Original file line numberDiff line numberDiff line change
@@ -12951,6 +12951,11 @@ ul.social-links li a {
1295112951
height: 100%;
1295212952
}
1295312953

12954+
.apidoc--view-mode-full .apidoc__spec .container {
12955+
padding-left: 0;
12956+
padding-right: 0;
12957+
}
12958+
1295412959
.swagger-ui > div > .wrapper,
1295512960
.swagger-ui > div > .scheme-container {
1295612961
border: 1px solid #ddd;

themes/custom/apigee_kickstart/src/sass/apigee-kickstart.style.scss

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
// -----------------------------------------------------------------------------
9797
@import "apigee/app";
9898
@import "apigee/apidoc";
99+
@import "apigee/smartdocs";
99100
@import "apigee/swagger";
100101
@import "block/block";
101102
@import "form/form.contact";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.apidoc--view-mode-full {
2+
.apidoc__spec .container {
3+
padding-left: 0;
4+
padding-right: 0;
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{#
2+
/**
3+
* @file
4+
* Template for the APIdoc page layout.
5+
*/
6+
#}
7+
{% embed 'page.html.twig' with {
8+
main_classes: ['bg-lighter']
9+
} %}
10+
{% block content %}
11+
<div class="container">
12+
{{ page.content }}
13+
</div>
14+
{% endblock %}
15+
{% endembed %}

0 commit comments

Comments
 (0)