Git Product home page Git Product logo

Comments (6)

christianhelle avatar christianhelle commented on July 21, 2024 1

@Ekkeir thanks for taking the time to report this

I'll update the docs and improve on the descriptions there

from refitter.

Ekkeir avatar Ekkeir commented on July 21, 2024 1

@christianhelle Looks great to me.

An example could optionally be added for this case. Something like this

EXAMPLES:
    ...
    refitter ./openapi.json --settings-file ./openapi.refitter  --output ./GeneratedCode.cs
    ...

Thank you for a quick response!

from refitter.

christianhelle avatar christianhelle commented on July 21, 2024 1

An example could optionally be added for this case. Something like this

EXAMPLES:
    ...
    refitter ./openapi.json --settings-file ./openapi.refitter  --output ./GeneratedCode.cs
    ...

@Ekkeir That's a good idea. I just implemented this change:

USAGE:
    refitter [URL or input file] [OPTIONS]

EXAMPLES:
    refitter ./openapi.json
    refitter https://petstore3.swagger.io/api/v3/openapi.yaml
    refitter ./openapi.json --settings-file ./openapi.refitter --output ./GeneratedCode.cs
    refitter ./openapi.json --namespace "Your.Namespace.Of.Choice.GeneratedCode" --output ./GeneratedCode.cs
    refitter ./openapi.json --namespace "Your.Namespace.Of.Choice.GeneratedCode" --internal
    refitter ./openapi.json --output ./IGeneratedCode.cs --interface-only
    refitter ./openapi.json --use-api-response
    refitter ./openapi.json --cancellation-tokens
    refitter ./openapi.json --no-operation-headers
    refitter ./openapi.json --no-accept-headers
    refitter ./openapi.json --use-iso-date-format
    refitter ./openapi.json --additional-namespace "Your.Additional.Namespace" --additional-namespace "Your.Other.Additional.Namespace"
    refitter ./openapi.json --multiple-interfaces ByEndpoint
    refitter ./openapi.json --tag Pet --tag Store --tag User
    refitter ./openapi.json --match-path '^/pet/.*'

ARGUMENTS:
    [URL or input file]    URL or file path to OpenAPI Specification file

OPTIONS:
                                      DEFAULT                                                                                                                       
    -h, --help                                         Prints help information                                                                                      
    -s, --settings-file                                Path to .refitter settings file. Specifying this will ignore all other settings (except for --output)        
    -n, --namespace                   GeneratedCode    Default namespace to use for generated types                                                                 
    -o, --output                      Output.cs        Path to Output file                                                                                          
        --no-auto-generated-header                     Don't add <auto-generated> header to output file                                                             
        --no-accept-headers                            Don't add <Accept> header to output file                                                                     
        --interface-only                               Don't generate contract types                                                                                
        --use-api-response                             Return Task<IApiResponse<T>> instead of Task<T>                                                              
        --internal                                     Set the accessibility of the generated types to 'internal'                                                   
        --cancellation-tokens                          Use cancellation tokens                                                                                      
        --no-operation-headers                         Don't generate operation headers                                                                             
        --no-logging                                   Don't log errors or collect telemetry                                                                        
        --additional-namespace                         Add additional namespace to generated types                                                                  
        --use-iso-date-format                          Explicitly format date query string parameters in ISO 8601 standard date format using delimiters (2023-06-15)
        --multiple-interfaces                          Generate a Refit interface for each endpoint. May be one of ByEndpoint, ByTag                                
        --match-path                                   Only include Paths that match the provided regular expression. May be set multiple times                     
        --tag                                          Only include Endpoints that contain this tag. May be set multiple times and result in OR'ed evaluation       
        --skip-validation                              Skip validation of the OpenAPI specification                                                                 

from refitter.

christianhelle avatar christianhelle commented on July 21, 2024

@all-contributors please add @Ekkeir for doc

from refitter.

allcontributors avatar allcontributors commented on July 21, 2024

@christianhelle

I've put up a pull request to add @Ekkeir! 🎉

from refitter.

christianhelle avatar christianhelle commented on July 21, 2024

@Ekkeir I'm changing the description text for --settings-file to Path to .refitter settings file. Specifying this will ignore all other settings (except for --output). Does that make more sense?

The help text for the CLI tool will look like this:

USAGE:
    refitter [URL or input file] [OPTIONS]

EXAMPLES:
    refitter ./openapi.json
    refitter https://petstore3.swagger.io/api/v3/openapi.yaml
    refitter ./openapi.json --settings-file ./openapi.refitter
    refitter ./openapi.json --namespace "Your.Namespace.Of.Choice.GeneratedCode" --output ./GeneratedCode.cs
    refitter ./openapi.json --namespace "Your.Namespace.Of.Choice.GeneratedCode" --internal
    refitter ./openapi.json --output ./IGeneratedCode.cs --interface-only
    refitter ./openapi.json --use-api-response
    refitter ./openapi.json --cancellation-tokens
    refitter ./openapi.json --no-operation-headers
    refitter ./openapi.json --no-accept-headers
    refitter ./openapi.json --use-iso-date-format
    refitter ./openapi.json --additional-namespace "Your.Additional.Namespace" --additional-namespace "Your.Other.Additional.Namespace"
    refitter ./openapi.json --multiple-interfaces ByEndpoint
    refitter ./openapi.json --tag Pet --tag Store --tag User
    refitter ./openapi.json --match-path '^/pet/.*'

ARGUMENTS:
    [URL or input file]    URL or file path to OpenAPI Specification file

OPTIONS:
                                      DEFAULT                                                                                                                       
    -h, --help                                         Prints help information                                                                                      
    -s, --settings-file                                Path to .refitter settings file. Specifying this will ignore all other settings (except for --output)        
    -n, --namespace                   GeneratedCode    Default namespace to use for generated types                                                                 
    -o, --output                      Output.cs        Path to Output file                                                                                          
        --no-auto-generated-header                     Don't add <auto-generated> header to output file                                                             
        --no-accept-headers                            Don't add <Accept> header to output file                                                                     
        --interface-only                               Don't generate contract types                                                                                
        --use-api-response                             Return Task<IApiResponse<T>> instead of Task<T>                                                              
        --internal                                     Set the accessibility of the generated types to 'internal'                                                   
        --cancellation-tokens                          Use cancellation tokens                                                                                      
        --no-operation-headers                         Don't generate operation headers                                                                             
        --no-logging                                   Don't log errors or collect telemetry                                                                        
        --additional-namespace                         Add additional namespace to generated types                                                                  
        --use-iso-date-format                          Explicitly format date query string parameters in ISO 8601 standard date format using delimiters (2023-06-15)
        --multiple-interfaces                          Generate a Refit interface for each endpoint. May be one of ByEndpoint, ByTag                                
        --match-path                                   Only include Paths that match the provided regular expression. May be set multiple times                     
        --tag                                          Only include Endpoints that contain this tag. May be set multiple times and result in OR'ed evaluation       
        --skip-validation                              Skip validation of the OpenAPI specification                                                                 

from refitter.

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.