I want to build an UI documentation with swagger for my Restful API. this is the offitial documentation for that https://symfony.com/doc/master/bundles/NelmioApiDocBundle/index.html
But i got this error Unrecognized option "areas" under "nelmio_api_doc"
#routing.yml
app.swagger_ui:
path: vyndteam/api/doc/{areas}
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger_ui }
#config.yml
nelmio_api_doc:
areas:
default:
path_patterns: [^/api]
host_patterns: [api\.]
business:
path_patterns: [^/business]
admin:
path_paterns: [^/admin]
Any suggestions?
You must check the version of the installed bundle "nelmio_api_doc"
the documentation is valid for version 3
Try changing this:
path: vyndteam/api/doc/{area}
Related
I've been trying to get electron-updater to update from latest releases that I put on Github but it keeps triggering this error.
code: 'ERR_UPDATER_ASSET_NOT_FOUND' }
What kind of files do you need to have in a Github release in order for previous versions to update properly?
so far I have the setup.exe, the setup.exe.blockmap, and the latest.yml
It successfully detects that an update is available in
autoUpdater.on('update-available', () => {
but then immediately throws an error in
autoUpdater.on('error', (err, err2) => {
resulting in an error of code: 'ERR_UPDATER_ASSET_NOT_FOUND' }
Previously, I had an issue where I was forgetting to put in latest.yml, but now, I'm really not sure as to what I should do.
check the latest.yml file. It should be something like this -
version: 1.1.0
files:
- url: ${Application-Name}.1.1.0.exe
sha512:${EncodedString}
size: 150466849
isAdminRightsRequired: true
path: ${Application-Name}.1.1.0.exe
sha512:${EncodedString}
releaseDate: '2021-04-26T14:26:54.929Z'
Most probably, the url name and path might not be matching with the uploaded file names in github. Spaces are replaced with - in github. It might be naming issue. I faced the similar issue.
I've had Twitter Typeahead.js integrated into a Rails app for some time, and working fine.
After a series of gem updates and movement of some dependencies to Bower, I am now seeing an error in the console and Typeahead.js is not being called correctly.
Uncaught TypeError: Cannot read property 'whitespace' of undefined
on
queryTokenizer: Bloodhound.tokenizers.whitespace
What does this mean, and how do I debug this?
My full code:
jQuery ->
if $('.country-typeahead').length
countries = new Bloodhound(
prefetch:
url: "../api/countries.json"
datumTokenizer: (datum) ->
Bloodhound.tokenizers.whitespace datum.name
queryTokenizer: Bloodhound.tokenizers.whitespace
)
countries.initialize()
$('.country-typeahead').typeahead null,
name: "countries"
displayKey: "name"
source: countries.ttAdapter()
The json looks like this
[{"id":1,"name":"Aruba"},{"id":2,"name":"Afghanistan":""},{.....etc}]
You may have figured this out already, but since I was having the same issue I thought I would post my solution.
don't use the bloodhound package in Bower and remove any references to that library. You only need typeahead.js since it includes bloodhound.
include typeahead.bunde.js instead typeahead.js the issue is because missing dependencies .bundle contains all required dependencies
I want to use fontawesome plugin in grails.
I have added in build config compile :font-awesome-resources:4.0.3.1 to add plugin.I have added
customBootstrap
{
dependsOn 'font-awesome'
resource url: 'css/bootstrap.css'
resource url: 'js/bootstrap.js' resource url: 'css/bootstrap-fixtaglib.css'
}
in applicationresource.groovy but when i run the application get error
ERROR resource.ResourceProcessor - Unable to load resources Message: No such property: pluginManager for class: org.springframework.web.context.support.XmlWebApplicationContext.Please provide solution.
I am not sure whether this is a configuration issue with migration from earlier grails versions or if font-awesome has not been migrated completely to grails 2.4.x. But I encountered this as well.
As a short (dirty) workaround, you can replace the code that causes the problem directly on the plugin.
File (replace X with your project name):
~/.grails/2.4.2/projects/X/plugins/font-awesome-resources-4.0.3.1/grails-app/conf/FontAwesomePluginResources.groovy
Replace lines 3 and 4 with:
def pluginManager = grails.util.Holders.pluginManager
def lesscssPlugin = pluginManager.getGrailsPlugin('lesscss-resources') || pluginManager.getGrailsPlugin('less-resources')
And give it a go.
I'm converting URL syntax from 3.4 to 4.2 syntax (CMIS 1.0)
I'm trying to upload a new version of a document to the PWC via a PUT for a document.
Previous 3.X syntax to upload to the PWC was as follows:
/alfresco/service/cmis/pwc/i/{id}?checkinComment={checkinComment?}&major={major?}&checkin={checkin?}
In 4.2 I am using this URL:
/alfresco/api/-default-/public/cmis/versions/1.0/atom/content?id=2e9c6773-4b02-41e0-b8e5-ce04a48c44f6?checkinComment=hgfhfgh&checkin=true&major=true
Here 2e9c6773-4b02-41e0-b8e5-ce04a48c44f6 == ID of the PWC.
I'm getting the error:
The remote server returned an error: (404) Not Found.
What's wrong with this?
When I step through cmislib's checkIn unit test against a preview build of 4.2 Enterprise using the new service URLs, I see that the PUT that does the checkin is hitting this URL:
u'http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom/entry?id=71be4c86-1dcb-49a8-8373-d1c5ea4405b7%3Bpwc'
So try changing "content" to "entry" and also double-check that you have the ID of the PWC. Note that mine actually has "pwc" on the end whereas yours does not.
I am having trouble with the plugin. Everything seemed fine but after running the app in dev env, the page loads up but complains that it can't find the compiled css file. I am using Grails 2.0.1 and lesscss-resources 1.3.0.
Here is what I have in UiResources.groovy:
styling {
defaultBundle 'styling'
resources url: '/less/mainStyles.less', attrs:[rel: "stylesheet/less", type: 'css'], disposition: 'head', bundle: 'bundle_styling'
resources url: '/css/other.css', disposition: 'head'
}
What shows up on the page is this:
< link href="/appName/bundle-bundle_styling_head.css" type="text/css" media="screen, projection" rel="stylesheet" >
Although I can locate this file in the
~/.grails/2.0.1/projects/appName/tomcat/worl/Tomcat/localhost/appName/grails-resources ...
Grails console also complains:
Resources not found: /bundle-bundle_styling_head.css
I have been trying different things to get this to work till no avail. Did I do anything wrong here?
I had a similar problem and found that removing the bundle option fixed the problem. So remove ", bundle: 'bundle_styling'" making the line:
resources url: '/less/mainStyles.less', attrs:[rel: "stylesheet/less", type: 'css'], disposition: 'head'
Hope this works for you too.
Be aware what the docs say currently in the issues section - maybe you are facing one of the bugs:
For the Bundle to work you must have a .css file at the end of the bundle, even if it is just a blank file.
Must specify the default bundle manually as this is calculated based on file extension by default.
I just had a case where I specified this in an inplace plugin (MyPluginApplicationResources.groovy)
resource url:'/less/eip.less', attrs:[rel: "stylesheet/less", type:'css'],defaultBundle: 'eip'
resource url: '/css/dummy.css', defaultBundle: 'eip'
There was no error but also no css rendered by the plugin, so I changed it to:
resource url:[dir: '/less', file : 'eip.less', plugin: 'my-plugin'], attrs:[rel: "stylesheet/less", type:'css'],defaultBundle: 'eip'
resource url: '/css/dummy.css', defaultBundle: 'eip'
This worked for me.
dummy.css : this is an empty css file (see issues) - but I haven't tested if its really needed.