When my project is missing some dependencies, roslyn is unable to read the semantic model of these APIs.
For example: uninstalling the newtonsoft.json dependency, when parsing the
var json = JsonConvert.SerializeObject(model); statement, it cannot return its semantic model.
How can I programmatically load the required dependencies? Thanks a lot!!!!
Related
I'm documenting a django project that use DRF. I already generated a dynamic API schema using openapi and redoc. Very cool solutions
However, I miss the permissions part in all of this
I have a lot of permissions (permission_classes) in the viewsets and some functions. Do you know any solution to include the permission in the schema, or in a documentation in general?
Going further, how do you document permissions in a APIs in general?
I already have an idea: include the permissions in a custom description in the schema, but it's still dirty
Thanks. José.-
PS: Sorry for the poor english
DRF is in the process of deprecating the use of the coreapi package, however currently there is not easy way within that solution to get security schemas to be added to your documentation.
However there is an alternative https://drf-yasg.readthedocs.io/en/stable/ this tool claims to support extracting these values (but I personally have not used it for that yet).
I have been through the document and followed the "Menifold.js" Procedure. But after that also I am still getting some errors in my developer account while uploading the extension.
Listing Some of the errors message
Package acceptance validation error: com.microsoft.edge.extension is a reserved extension type. Your app does not have permission to use this extension type. To request permission, please use our extension submission form.
Package acceptance validation error: Apps are not allowed to have a Version with a revision number other than zero specified in the app manifest. The package Extension.appx specifies 0.0.0.2.
I have a Django site and a local install of Alfresco (community edition). One of my model contains a file reference which maps to a document in Alfresco. The view should have a field that spawns a file browser that can access the repository structure within Alfresco so that the user can pick whichever file they want at whichever version.
I looked at the CMSIlib module and it seems to be providing all the interaction I need for the back end code. Although downloading a document seems clunky.
There are lots of Django file browsers but none seem to interface with CMSIlib.
Do I have to code my own or have I missed something?
The version is Alfresco Community v5.0.0 (d r99759-b2) schema 8022 Spring Surf and Spring WebScripts - v5.0.0.
To be honest, I am not a python guy ! But I heard over the official #alfresco IRC channel that cmislib is not so much of an active project, and questions about it only bump once in a while .... The RESTful api however may be considered as a good alternative in your use case:
To access alfresco content using the RESTful api, you should be querying this webscript: /alfresco/d/<d|a>/<workspace>/<store>/<nodeId>/<filename>
where :
d and a refer to direct / attached mode
<workspace>, <store> and <nodeId> reference your content nodeRef
<filename> a file name of your choice
So you should be making a GET Request an a URL that looks something like this http://<host>:<port>/alfresco/d/d/workspace/SpacesStore/8444ad61-4734-40e3-b2d4-b8b1c81347fd/myFile.ext
Note : Depending on the permission set on your node, you might need to attach an alf_ticket to the URL for an authenticated alfresco user. Please check this for further insights.
UPDATE 1:
If you have a problem identifying your file nodeRef, then you can setup a repo webscript implementing your custom logic (browsing some folder / searching for a document by name or metadata ....)
If your are not familiar with webscript development check Jeff Pott's tutorial on the subject
UPDATE 2:
To get started with your webscript development check out Alfresco docs/wiki!
Check this wiki page to learn how to retrieve children for a given node !
Or check this wiki page to learn how to develop webscripts implementing your custom business logic.
If you do not have anything against the YUI javascript library (that is no longer actively maintained), you can integrate the object-finder already available in Alfresco Share. The library is in
share/components/object-finder/object-finder.js
You will need to modify it a bit given that you are not inside Share.
To be totally honest, I do not know if it is feasible because it has other dependencies but being a browser site library, in theory can be integrated everywhere.
I am new to solr 4.1.0 and was trying to set it up on my MacOSX machine using Tomcat7 and the instructions on the following page:
http://contextllc.com/node/76
I was able to do everything properly, and it worked! I then followed instructions on the haystack documentation to setup haystack and output a schema.xml file. I then created a new core using SolrAdmin and used that schema and keep getting:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "text": Plugin init failure for [schema.xml] analyzer/filter: Error loading class 'solr.EnglishPorterFilterFactory'
Is there something i'm missing in the above? I have included all of the solr jar files and cannot find anything else that would be required?
Not sure why..but the issue went away after I switched to solr 3.6.2... Something definitely changed with the versions.
I noticed recently that ELMAH has support for exporting details of an exception via JSON and XML. Out of sheer curiosity, why would anyone use this?
If I was storing my data in a SQL DB, why not retrieve the value from there? Additionally, the errors are stored in a pseudo xml format already... why export something that's already in xml to xml?
Just wondering...
The JSON and XML export features were added to enable and encourage anyone to develop a client to ELMAH using simply HTTP for access rather than relying on the choice of back-end storage. A client can be, for example, written to provide alternative and richer views (dashboards or using Ajax) in addition to the built-in ones, perform analytics, full-text search and more.
A basic client would need to take one or more “home” URLs of ELMAH deployments and build a TOC of the log. This is easily done by simply downloading the CSV off the home URL. Each record in the CSV provides a URL to the detailed entry, which in turn can be used to get the full details of an error in XML or JSON.