StratisBitcoinFullNode
StratisBitcoinFullNode copied to clipboard
[Swagger] Create Branding
Make a Swagger Branding
The idea is to have a custom Swagger with some branding details / style.
Nice.
Important thing: The feature Stratis.Bitcoin.Features.Api
is used as a project reference, so in each projet that use it, like Stratis.StratisD
, the DLL is copied into the output folder, the problem is my changes add a wwwroot
folder with some assets.
So I added a copy feature in the .csproj of Stratis.Bitcoin.Features.Api
to copy the wwwroot
folder in the output, like this:
<ItemGroup>
<Content Update="wwwroot\**\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
My question is, does this will be a problem ? and also if I rename the wwwroot
folder in swagger
by example.
About the Stratis Color codes, can have some precisions, I don't know if the color that I use is the good.
Fixed f8d062a19f43d87c6084e8578538f105cd6fbc73
Another point: Maybe we can display an information on the swagger about the network that is ran, if it's bitcoin network, stratis network etc
I said this because when I launch Stratis.StratisD
or Bitcoin.BitcoinD
I don't see any differences in the swagger.
@clintnetwork top of the page looks great, but bottom part little bit confused me.
@noescape00 what do you think?
Yes yes, you right, the try out design is not finished, for now its less readable it's true.
In fact I made this PR to have a base and discuss about the direction to take. 👍
@kogot I agree with you. Let's see how it will look like once the design is done
Way better now from a readability perspective. Is it the final version?
No no, we had some ideas with @dangershony to create a multipages swagger with an embedded wallet maybe or other features.
I also opened this PR to brainstorm about that.
@clintnetwork multipage can be done in following PRs, if you find a good stable swagger customized UI I say we can consider pushing it.
I create a ResourceFileProvider
to serve assets from resources because I get some issues using
EmbeddedFileProvider
, if someone can help me.
I had an old dashboard project for stratis and I was using EmbeddedFileProvider but a lot of time passed (more than 2 years!) here https://github.com/MithrilMan/Stratis.Bitcoin.Dashboard/blob/56c98c199b2ea873c13b69ae123c3fe53a761ed5/Stratis.Bitcoin.Dashboard/Startup.cs
what kind of problem did you have? try to take a look at the code if it may help you, otherwise I'll try to remember how I was using it
Ha nice @MithrilMan just trying to use EmbeddedFileProvider
to embed the wwwroot folder in resources and use it but I don't know why but it does not works, maybe you can fork my PR and try to implement EmbeddedFileProvider
@clintnetwork ok if I'll find the time I'll try that
@MithrilMan are you on the slack ?