Coder Social home page Coder Social logo

Please support satori/uuid about swag HOT 9 CLOSED

swaggo avatar swaggo commented on August 15, 2024
Please support satori/uuid

from swag.

Comments (9)

pei0804 avatar pei0804 commented on August 15, 2024

OK I check.

from swag.

pei0804 avatar pei0804 commented on August 15, 2024

I decided to use format to approach this.
I'll create format annotation.

For example if you want to use uuid.
You'll can set type in string and format in uuid.

              schema:
                type: object
                properties:
                  uuid:
                    type: string <-- You can set.
                    format: uuid <--  This is feature. wait please.

from swag.

pei0804 avatar pei0804 commented on August 15, 2024

I create this feature for you.
#102

from swag.

easonlin404 avatar easonlin404 commented on August 15, 2024

@y-ogura please reopen it if you have any question.

from swag.

grecinto avatar grecinto commented on August 15, 2024

How do you use format: uuid in @param for a Controller?

from swag.

ubogdan avatar ubogdan commented on August 15, 2024

Have you tried?
// @Param id path uuid.UUID true "Account ID"

from swag.

grecinto avatar grecinto commented on August 15, 2024

I tried this and it is NOT generating a parameter in the generated swagger spec for it:
// @param id query uuid.UUID true "ID"

swag version v1.7.6

from swag.

ubogdan avatar ubogdan commented on August 15, 2024

A query param can be only a string or integer as a datatype. So the following definition should fit your needs.

// @param id query string true "uuid formatted ID."

from swag.

grecinto avatar grecinto commented on August 15, 2024

ok thanks, that is what I did (string type).

from swag.

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.