Redoc side menu - asp.net-core-3.1

I want to use Redoc for my API documentation. I also have swagger.
I found here : https://github.com/Redocly/redoc this line - Integrate API Introduction into side menu - ReDoc takes advantage of markdown headings from OpenAPI description field. It pulls them into side menu and also supports deep linking.
I want to add my readme file to left side bar in Redoc. But I didn`t find any good example for it. What should I change, where readme should be added?
My redoc setup :
app.UseReDoc(c =>
{
c.DocumentTitle = $"Documentation";
c.SpecUrl = /api/docs/swagger.json";
c.RoutePrefix = "docs";
});

That documentation is referring to the info.description field.
You can embed the readme into the API definition like this:
info:
description:
$ref: ./path/to/readme.md
Replace that path with your actual path to the readme.
Source: https://redoc.ly/docs/api-reference-docs/embedded-markdown/#embedded-markdown-in-redocly-api-reference-docs
Note: If you are unable to change the API description, you could do it in post-processing using OpenAPI CLI and a custom decorator with the bundle command.

Related

How to get rid of the hash symbol (`#`) in the URL in UI5-routing?

Starting the 1.83.x/1.84.x OpenUI5 versions there is a possibility to omit the hash symbol (#) from the browser routing URL.
The new URL-format vs. the old-one:
https://openui5.hana.ondemand.com/topic/1b6dcd39a6a74f528b27ddb22f15af0d
https://sapui5.hana.ondemand.com/#/topic/1b6dcd39a6a74f528b27ddb22f15af0d
I've checked the OpenUI5 documentation but could not find how to get rid of this # in the URL.
Is it somewhere in manifest.json?
The OpenUI5 Demo Kit is using a custom Router in order to improve its SEO. See commit 4614eb0.
Routing without # is not officially supported yet. There is an enhancement request though: https://github.com/SAP/openui5/issues/2993

GitHub relative internal repository links in PULL_REQUEST_TEMPLATE.md

Using a relative link as directed (https://help.github.com/articles/about-readmes/#relative-links-and-image-paths-in-readme-files) in a PULL_REQUEST_TEMPLATE.md does not relatively link correctly.
When viewed in an actual PR:

[CONTRIBUTING.md](/.github/CONTRIBUTING.md)
routes to: https://github.com/.github/CONTRIBUTING.md.
[CONTRIBUTING.md](.github/CONTRIBUTING.md)

[CONTRIBUTING.md](./.github/CONTRIBUTING.md)
route to:
https://github.com/owner/repo/compare/.github/CONTRIBUTING.md
instead of https://github.com/owner/repo/.github/CONTRIBUTING.md.
Changing to ../ to go up a level would work for PRs, but would break the link when viewed in the GitHub UI.
Clicking the link as viewed on GitHub works: https://github.com/fs-webdev/fs-dialog/blob/master/.github/PULL_REQUEST_TEMPLATE.md, just not inside a PR.
(I feel like this used to work in 2017)
What is the correct way to have the relative link function as expected in both cases?
Background
Unfortunately, the given implementation seems to consider only the current
URL instead of the actual file path in the repository.
The same limitation can be noted when creating issues (through e.g.:
https://github.com/owner/repo/issues/new):
[CONTRIBUTING.md](.github/CONTRIBUTING.md)
->
https://github.com/owner/repo/issues/.github/CONTRIBUTING.md
Workaround
I only managed to make the relative link work by specifying the full URL
path (including the leading /):
[CONTRIBUTING.md](/owner/repo/.github/CONTRIBUTING.md)
->
https://github.com/owner/repo/.github/CONTRIBUTING.md
With that said, the abstraction can only go up to the URL host (i.e.:
https://github.com).

Update Template description using Python SDK for Smarsheet API

Asking with hopefulness.
Is there are way to update the Template Description either directly or using the Python SDK?
I'm guessing "no" since the only way to see the Template Description after creation is via the API (can not via the GUI).
-Craig
No, the template endpoints are read-only.

Is there a way to include hyperlink to some external HTTP URL in Scaladoc?

Using Scaladoc, is there a way to include hyperlink to some external HTTP URL ?
using Javadoc this was easy.. but I am having trouble figuring out the syntax for Scaladoc. I looked here: https://wiki.scala-lang.org/display/SW/Writing+Documentation, but came up dry.
Say I want to link to an external resource like this > https://en.wikipedia.org/wiki/Aardvark < in my documentation. What is the markup I should use ?
You can try this :
External links: [[http://scala-lang.org Scala web site]] becomes Scala
web site. The URL part must start with a scheme name (like http:) and
must not contain white space. The name part (Scala web site) is
optional.

Working with Trello cards in Eclipse

Is it possible to setup Trello as an Eclipse Mylyn task repository? Is there any existing connector or some other way to do it?
This excellent tutorial explains how it may be done by using Web Template Connector along with the Trello REST API.
However, the regex pattern in #19 there isn't totally correct, and causes to some issues being skipped. It should be changed to this:
\"id\"[\x00-\x7F]+?\"idShort\":({Type}[0-9]+)[\x00-\x7F]+?\"name\":\"({Description}[\x00-\x7F]+?)\"[\x00-\x7F]+?\"shortLink\":\"({Id}[\x00-\x7F]+?)\"[\x00-\x7F]+?\"url\"
So that all user's cards will appear in the MyLyn repository.
Correct regexp to tutorial. It supports labels of cards and cyrillic description.
All cards:
\"id\".+?\"idShort\":({Type}[0-9]+).+?(?:\"idLabels\".+?)\"name\":\"({Description}.+?)\",.+?\"shortLink\":\"({Id}.+?)\".+?\"url\"
Cards of your BOARD_ID
\"idBoard\":\"BOARD_ID\".+?\"idShort\":({Type}[0-9]+).+?(?:\"idLabels\".+?)\"name\":\"({Description}.+?)\",.+?\"shortLink\":\"({Id}.+?)\".+?\"url\"
The regular expressions didn't work for me anymore. Instead I did this:
Create a new web template repository:
Create a new web template repository
Under additional settings, add the applicationkey and userkey parameter
Under advanced configuration, add the task url https://trello.com/c/
Leave the rest empty.
Create a new query:
Go to the Task List view. Rightclick New -> Query
Select the web template repository and name it after the board or however you like
Add another parameter boardid. You can get the board id from https://trello.com/1/members/my?key={{trello_applicationkey}}&token={{trello_userkey}}
For Query URL use https://api.trello.com/1/boards/${boardid}/cards?fields=name,shortLink&key=${applicationkey}&token=${userkey}
For Query Pattern use "name":"({Description}.+?)","shortLink":"({Id}.+?)"
The other answers were giving all cards in the board, not just the ones assigned to me. I used the API search with filters to get what I needed.
Create a new web template repository:
Under additional settings, add the applicationkey, userkey, memberid
and boardname parameters
Under advanced configuration, add the task url https://trello.com/c/
Leave the rest empty.
Create a new query:
Query URL:
https://api.trello.com/1/search?query=member:${memberid}%20board:${boardname}&card_fields=name,shortLink&cards_limit=100&key=${applicationkey}&token=${userkey}
Query Pattern:
"name":"({Description}.+?)","shortLink":"({Id}.+?)"
More information in this answer.
I had the error Failed to parse RSS feed: "Invalid XML: Error on line 1: Content is not allowed in prolog.
After days of trying to fix this, I finally found that it was en encoding error.
In the Web Repository Settings under Additional Settings I selected US-ASCII.
I hope to help other people!