GithubHelp home page GithubHelp logo

Comments (16)

abelsilva avatar abelsilva commented on July 4, 2024

Hi

The parameter hideFromSpec on SwaggerWcfTag is used to hide the tag itself, not the function.
You can see it in the description:

image

Thanks

from swaggerwcf.

JFDionne avatar JFDionne commented on July 4, 2024

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.

abelsilva avatar abelsilva commented on July 4, 2024

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.

JFDionne avatar JFDionne commented on July 4, 2024

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.

abelsilva avatar abelsilva commented on July 4, 2024

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.

JFDionne avatar JFDionne commented on July 4, 2024

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.

abelsilva avatar abelsilva commented on July 4, 2024

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.

JFDionne avatar JFDionne commented on July 4, 2024

it will be wonderful!

from swaggerwcf.

abelsilva avatar abelsilva commented on July 4, 2024

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.

abelsilva avatar abelsilva commented on July 4, 2024

please let me know if it works for you, thanks!

from swaggerwcf.

JFDionne avatar JFDionne commented on July 4, 2024

Working, thank you ! :)

from swaggerwcf.

JFDionne avatar JFDionne commented on July 4, 2024

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.

abelsilva avatar abelsilva commented on July 4, 2024

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.

abelsilva avatar abelsilva commented on July 4, 2024

Sorry, it should work yes, let me check

from swaggerwcf.

JFDionne avatar JFDionne commented on July 4, 2024

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.

abelsilva avatar abelsilva commented on July 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.