Comments (16)
Hi
The parameter hideFromSpec
on SwaggerWcfTag
is used to hide the tag itself, not the function.
You can see it in the description:
Thanks
from swaggerwcf.
Ah, but if you don't want to see tag why you put the tag? :)
Can I change this Issue for make a suggestion to add a param for hide the tag and the function, like if we set the visible = false on the config file?
The point is to have all the tag visible false by default and enable only the tag I want into this endpoint.
from swaggerwcf.
the idea is when you use the tag to hide the functions, e.g., 'functionToHide'
You probably don't want that tag to show up in the spec, it is only for internal management
but if you want to hide a function you can use
[SwaggerWcfHidden]
from swaggerwcf.
okay, if I add [SwaggerWcfHidden] it will but the "visible" = false?
Do it will appear if I put tag name="Function_Tag" visible="true" into the web.config ?
from swaggerwcf.
I didn't get the question
the
[SwaggerWcfHidden]
will hide the function
if with the tag you ask to be visible, one of the actions will override the other
from swaggerwcf.
Sorry i'm not clear :)
I have 4 endpoint on the same projet, since we can't "choose" which projet I want to show up on the api-docs I use the
[tag name="Test_1_Tag" visible="true"]
[tag name="Test_2_Tag" visible="false"]
[tag name="Test_3_Tag" visible="false"]
[tag name="Test_4_Tag" visible="false"]
into the web.config.
and I put
<SwaggerWcfTag("Test_1_Tag")> on my code for each fonction of the endpoint, I'll use _2 _3 and _4 on the other.
My point here is, do we have a way for having the visible false by default so I can put only visible=true on the endpoint I want to see on the api-docs?
right now if I add another endpoint, I'll need to go on each web,config and add the visible=false for this projet.
from swaggerwcf.
Yes, you would need, by default it should true (like it is now)
I guess it would be ok to add a new parameter to the SwaggerWcfHidden
to help on the cases you mentioned, to change the value of visible
from swaggerwcf.
it will be wonderful!
from swaggerwcf.
The idea is that you mark your methods with
SwaggerWcfHidden
and one SwaggerTag, e.g.:
SwaggerWcfTag("show")
If then, when you want to show them, just add to web.config
:
<tag name="show" visible="true"/>
The web.config
configuration will override the SwaggerWcfHidden
tag
from swaggerwcf.
please let me know if it works for you, thanks!
from swaggerwcf.
Working, thank you ! :)
from swaggerwcf.
oups, I talked too fast, not working for me with version 18.
I put the tag on my Interface:
<SwaggerWcfHidden>
<SwaggerWcfTag("Service_TA_REST")>
<SwaggerWcfPath("Info Véhicule", "Récupere l'information d'un véhicule" & vbCrLf & "
Basic Authentification")>
<WebInvoke(Method:="GET", RequestFormat:=WebMessageFormat.Json, ResponseFormat:=WebMessageFormat.Json, UriTemplate:="/v1/vehicule/{id}")>
<OperationContract>
Function Recupere_Vehicule_V1(id As String) As clsInfo_Vehicule_REST
and on my web.config:
but the tag doesn't appear, do I miss something?
from swaggerwcf.
As I said, one of the actions will override the other, and as we can see now, SwaggerWcfHidden
will have more priority
If you want control from the web.config you don't need to use SwaggerWcfHidden
from swaggerwcf.
Sorry, it should work yes, let me check
from swaggerwcf.
Oh, but the use of SwaggerWcfHidden was not to be able to "force" to show it from the web.config?
[Sorry, I didn't see your last comment before I post this one]
from swaggerwcf.
Should work like I last described, something is probably wrong
The idea is that you mark your methods with
SwaggerWcfHidden
and one SwaggerTag, e.g.:
SwaggerWcfTag("show")
If then, when you want to show them, just add to web.config
:
<tag name="show" visible="true"/>
The web.config
configuration will override the SwaggerWcfHidden
tag
from swaggerwcf.
Related Issues (20)
- ServiceContract Attribute
- swagger.json file loses details over time HOT 1
- swaggerwcf CPU 100%
- Models NameSpaces.Class but I want just CLass HOT 3
- Request Error while access external models as parameters
- Swaggerwcf doesn't support ServiceContracts with the same methodsname.
- SwaggerWCF issue with routes and yaml HOT 1
- Adding Basic Authentication
- Adding project as a reference - failed to parse JSON/YAML response
- Unclear instuction WebServiceHost / Self Host HOT 3
- returning multiple types
- Generate multiple-files based on different WCF classes or tags HOT 2
- Request URL HOT 1
- URL issue
- In IIS , response body as "no centent" for swaggerWCF HOT 1
- NullReferenceException on GetEnumDescription
- Enum return value not included in definitions
- How to get Swagger json inside my API ?
- Setting an example value when there's an object on GET method
- ProcessProperty() of TypePropertiesProcessor.cs not handling IList type, Solution here.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swaggerwcf.