Skip to content

Commit

Permalink
Merge pull request #119 from jacine/DRUP-816
Browse files Browse the repository at this point in the history
[DRUP-816] Remove Swagger UI in favor of SmartDocs
  • Loading branch information
jacine authored May 28, 2019
2 parents 33c8549 + 5b31b72 commit 1ba3036
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 54 deletions.
1 change: 0 additions & 1 deletion apigee_devportal_kickstart.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ install:
- forum
- paragraphs
- pathauto
- swagger_ui_formatter

# List any themes that should be installed as part of the profile installation.
# Note that this will not set any theme as the default theme.
Expand Down
19 changes: 1 addition & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"swagger-api/swagger-ui": {
"type": "package",
"package": {
"name": "swagger-api/swagger-ui",
"version": "3.22.0",
"type": "drupal-library",
"dist": {
"url": "https://github.com/swagger-api/swagger-ui/archive/v3.22.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "^1.2.0"
}
}
}
},
"require": {
Expand All @@ -39,9 +24,7 @@
"drupal/fontawesome": "^2.12",
"drupal/paragraphs": "^1.6",
"drupal/pathauto": "^1.3",
"drupal/radix": "^4.3",
"drupal/swagger_ui_formatter": "^2.2",
"swagger-api/swagger-ui": "^3.21"
"drupal/radix": "^4.3"
},
"require-dev": {
"drush/drush": "~9",
Expand Down
22 changes: 11 additions & 11 deletions config/install/core.entity_form_display.apidoc.apidoc.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@ dependencies:
module:
- apigee_api_catalog
- file
- file_link
- media_library
- text
id: apidoc.apidoc.default
targetEntityType: apidoc
bundle: apidoc
mode: default
content:
api_product:
type: entity_reference_autocomplete
weight: 2
region: content
settings:
match_operator: CONTAINS
size: 60
placeholder: ''
third_party_settings: { }
description:
type: text_textarea
weight: 1
Expand All @@ -43,7 +35,8 @@ content:
field_image:
type: media_library_widget
weight: 7
settings: { }
settings:
media_types: { }
third_party_settings: { }
region: content
name:
Expand All @@ -57,9 +50,16 @@ content:
spec:
label: hidden
type: file_generic
weight: 3
region: content
weight: 26
settings:
progress_indicator: throbber
third_party_settings: { }
status:
type: boolean_checkbox
weight: 1
region: content
settings:
display_label: true
third_party_settings: { }
hidden: { }
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ content:
link_to_entity: false
third_party_settings: { }
hidden:
api_product: true
field_categories: true
spec: true
19 changes: 2 additions & 17 deletions config/install/core.entity_view_display.apidoc.apidoc.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,19 @@ dependencies:
- field.field.apidoc.apidoc.field_image
module:
- apigee_api_catalog
- swagger_ui_formatter
id: apidoc.apidoc.default
targetEntityType: apidoc
bundle: apidoc
mode: default
content:
spec:
label: hidden
type: swagger_ui_file
type: apigee_api_catalog_smartdocs
weight: 0
region: content
settings:
validator: default
validator_url: ''
doc_expansion: list
show_top_bar: 0
sort_tags_by_name: 0
supported_submit_methods:
get: 0
put: 0
post: 0
delete: 0
options: 0
head: 0
patch: 0
settings: { }
third_party_settings: { }
hidden:
api_product: true
description: true
field_categories: true
field_image: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
"field_link": [
{
"uri": "internal:\/apidoc\/2",
"uri": "internal:\/api\/2",
"title": "View Documentation",
"options": [],
"lang": "en"
Expand All @@ -126,4 +126,4 @@
"lang": "en"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
"field_link": [
{
"uri": "internal:\/apidoc\/1",
"uri": "internal:\/api\/1",
"title": "View Documentation",
"options": [],
"lang": "en"
Expand All @@ -126,4 +126,4 @@
"lang": "en"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
"field_link": [
{
"uri": "internal:\/apidoc\/3",
"uri": "internal:\/api\/3",
"title": "View Documentation",
"options": [],
"lang": "en"
Expand All @@ -126,4 +126,4 @@
"lang": "en"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12951,6 +12951,11 @@ ul.social-links li a {
height: 100%;
}

.apidoc--view-mode-full .apidoc__spec .container {
padding-left: 0;
padding-right: 0;
}

.swagger-ui > div > .wrapper,
.swagger-ui > div > .scheme-container {
border: 1px solid #ddd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
// -----------------------------------------------------------------------------
@import "apigee/app";
@import "apigee/apidoc";
@import "apigee/smartdocs";
@import "apigee/swagger";
@import "block/block";
@import "form/form.contact";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.apidoc--view-mode-full {
.apidoc__spec .container {
padding-left: 0;
padding-right: 0;
}
}
15 changes: 15 additions & 0 deletions themes/custom/apigee_kickstart/templates/page/page--api.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{#
/**
* @file
* Template for the APIdoc page layout.
*/
#}
{% embed 'page.html.twig' with {
main_classes: ['bg-lighter']
} %}
{% block content %}
<div class="container">
{{ page.content }}
</div>
{% endblock %}
{% endembed %}

0 comments on commit 1ba3036

Please sign in to comment.