Hide method signatures in Doxygen - doxygen

I'm trying to document some Java REST interfaces uses Doxygen, similar to this.
The problem I'm having is that I can't remove the method signature from the output, so each section looks like this:
Book com.place.getBook(#QueryParam("title") String title, #QueryParam("author"))
This method returns a book or list of books matching the given title and author.
Parameters:
title - The title of the book
author - The author(s) of the book. Separate multiple authors with commas.
But what I actually want is to display the URL and no method signature:
URL: /services/book?title={title}&author={author}
This method returns a book or list of books matching the given title and author.
Parameters:
title - The title of the book
author - The author(s) of the book. Separate multiple authors with commas.
I think I can add my URL tag using a custom alias, but how do I get rid of the method signature?

Related

Schema.org: How to use isAccessoryOrSparePartFor in JSON-LD?

I'm trying to declare products in JSON-LD for schema.org. I came across isAccessoryOrSparePartFor. So what do I put inside this tag? Schema.org says it should be a Product - but do I really have to put full product-declarations in it? Could I put URLs or EANs of the sparepart-products in it?
For the isAccessoryOrSparePartFor property, a Product value is expected, but not required.
From the Schema.org documentation:
Expected types vs text. When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL. […]
Of course, some consumers might not support other values than the expected ones.
You can use a minimal product declaration with only #context, #type and the product URL as id.
Example:
isAccessoryOrSparePartFor: [
{
'#context': 'http://schema.org',
'#type': 'Product',
id: UNIQUE_PRODUCT_ID_1'
},
{
'#context': 'http://schema.org',
'#type': 'Product',
id: UNIQUE_PRODUCT_ID_2'
},
...
]
You can check use Google's testing tool for structured data to validate.

How to get article with comments using Drupal 8 REST?

As in the title. GET /node/1 returns article details with field called "comment" - but there are comment settings. GET /comment/1 returns comment with id 1 details. So how can I get article with comments list? Or just comments list for specific article?
Create a new View with the following settings:
Provide a REST export, and add a path.
Make sure that Format is set to Serializer and Accepted request format is set to json
Add a filter for Content: Type (= [your format])
Add in Fields a field for Content: Comments

enterprise architect api: Add element to a collection

I have few short questions regarding Enterprise architect.
My question is regarding the automation interface. When following the instructions provided on this page: http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/colle... in order to add a new element to the collection ( and the .eap file) it does not add the element. I can get data from the elements, modify and even delete them, but adding a new element does not work?
Instructions provided:
Call AddNew to add a new item.
Modify the item as required.
Call Update on the item to save it to the database.
Call Refresh on the collection to include it in the current set.
my java example:
elements is a collection of all the elements in the model...
org.sparx.Element elementEa = elements.AddNew("Requirement", "non-functional");
elementEa.Update();
elements.Refresh();
With the api is it possible to change the id or guid of an element since there are no methods specified in org.sparx for that?
One last thing... Is it possible to create a custom element in EA, for example a requirement which will not have the standard properties like difficulty, priority etc.. , but will have others? (normal properties, not tagged values)
The arguments to AddNew() are Name and Type, so to create a Requirement element you should specify "SomeRequirementName" and "Requirement".
You can't change the ID or GUID through the API, and your models would crash and burn if you did (connectors would be left dangling, elements would vanish from diagrams, etc, etc).
With an MDG Technology you can create very detailed stereotyped elements if you like, with their own visual representations (shape scripts) etc, but if you're after creating an element type with its own properties dialog the answer is no; there is no hook for a custom dialog in the API.
Collection<Package> packageCollection = myPackage.GetPackages();
Package consolidatedCfsSpecPackage = packageCollection.AddNew("somePackageName", "");
if (!consolidatedCfsSpecPackage.Update()) {
System.err.println("Not Updated: somePackageName");
}
packageCollection.Refresh();
This works for me. I suggest you to check return value of elementEa.Update() method you called. If it returns false, you can get the reason by calling elementEa.GetLastError().

Generate a list of keywords using Doxygen

I am curious if it is possible to generate a list of keywords, a index if you will, for easy reference by doxygen ? I am not talking of list of classes etc. but specific words that are used as indexes.
This is possible but AFAIK only with the Latex/pdf output, with the command \addindex
See the manual.
If anybody knows a way to produce an index with the HTML, I would be very interested too.
xrefitem
With this you can create a page for each of your keywords. One example they already make an alias for:
\xrefitem todo "Todo" "Todo List"
You can add other aliases in your Doxygen file:
ALIASES += "reminder=\xrefitem reminders \"Reminder\" \"Reminders\""
Then in the code you can do something like:
\reminder Add the cool feature here.
And you'll get a Reminder page with the list of reminders on it.

Parsing comma separated string into multiple database entries (eg. Tags)

I want to create a Symfony 2 Form for a Blog Post. One of the fields that I am wondering how might I implement is the tags field. Post has a many-to-many relationship with Tag. I want my Form to have 1 text box where users enter in a comma separated list of tags. Which will then be converted into multiple Tag's.
How should I implement it? Do I:
Have a tagsInput field (named differently from in the Entity where $tags should be an ArrayCollection)
On POST, I split the tags and create/get multiple tags. Then validate the tags (eg. MaxLength of 32)
I think you are already on the right way since I saw your other question about the form type. I will just comfort you with your choice.
A form type is probably the best way to go. With the form type, you will be able to display a single text field in your form. You will also be able to transform the data into a string for display to the user and to an ArrayCollection to set it in your model. For this, you use a DataTransformer exactly as you are doing in your other question.
With this technique, you don't need an extra field tagsInput in your model, you can have only a single field named tags that will an ArrayCollection. Having one field is possible because the you form type will transform that data from a string to an ArrayCollection.
For the validation, I think you could use the Choice validator. This validator directive seems to be able to validate that an array does not have less than a number of item and not more than another number. You can check the documentation for it here. You would use it like this:
// src/Acme/BlogBundle/Entity/Author.php
use Symfony\Component\Validator\Constraints as Assert;
class Post
{
/**
* #Assert\Choice(min = 1, max = 32)
*/
protected $tags;
}
If it does not work or not as intended, what you could do is to create a custom validator. This validator will then be put in your model for the tags field. This validator would validate the an array have a maximum number of element no greater than a fixed number (32 in your case).
Hope this helps.
Regards,
Matt