swagger-api / swagger-api/swagger-ui
Hierarchical Tags with laravel api
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Hello @kael-shipman. I have a problem with Hierarchical Tags in my laravel api. I can't make it work successfully. I make a screenshot and give all information i have. I don't know where is the problem exactly.
In console, this message appears:
- GET https://unpkg.com/swagger-ui-plugin-hierarchical-tags net::ERR_ABORTED 404
- Uncaught ReferenceError: HierarchicalTagsPlugin is not defined
at window.onload (documentation:100)
Q&A (please complete the following information)
- OS: Ubuntu 20.04
- Browser: chrome
- Method of installation: npm
- Swagger-UI version: 3.10.0
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Swagger-UI configuration options:
SwaggerUI({
dom_id: '#swagger-ui',
url: "{!! $urlToDocs !!}",
operationsSorter: {!! isset($operationsSorter) ? '"' . $operationsSorter . '"' : 'null' !!},
configUrl: {!! isset($configUrl) ? '"' . $configUrl . '"' : 'null' !!},
validatorUrl: {!! isset($validatorUrl) ? '"' . $validatorUrl . '"' : 'null' !!},
oauth2RedirectUrl: "{{ route('l5-swagger.'.$documentation.'.oauth2_callback') }}",
requestInterceptor: function(request) {
request.headers['X-CSRF-TOKEN'] = '{{ csrf_token() }}';
return request;
},
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl,
HierarchicalTagsPlugin
],
layout: "StandaloneLayout",
persistAuthorization: {!! config('l5-swagger.defaults.persist_authorization') ? 'true' : 'false' !!},
})
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SwaggerUI configuration in the issue, especially the HierarchicalTagsPlugin entry and the unpkg asset request, using Swagger UI 3.10.0 in Chrome. Reproduce the console errors and check how the plugin is loaded in the Laravel API documentation page. Done means the plugin loads successfully and hierarchical tags work without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, laravel
- Domain
- api, documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100