Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > dotnet new "api" --help
- Usage: new [options]
- Options:
- -h, --help Displays help for this command.
- -l, --list Lists templates containing the specified name. If no name is specified, lists all templates.
- -n, --name The name for the output being created. If no name is specified, the name of the current directory is used.
- -o, --output Location to place the generated output.
- -i, --install Installs a source or a template pack.
- -u, --uninstall Uninstalls a source or a template pack.
- --nuget-source Specifies a NuGet source to use during install.
- --type Filters templates based on available types. Predefined values are "project", "item" or "other".
- --dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation.
- --force Forces content to be generated even if it would change existing files.
- -lang, --language Filters templates based on language and specifies the language of the template to create.
- --update-check Check the currently installed template packs for updates.
- --update-apply Check the currently installed template packs for update, and install the updates.
- ASP.NET Core API Boxed (C#)
- Author: Muhammad Rehan Saeed (RehanSaeed.com)
- Options:
- -t|--title The name of the project which determines the assembly product name. If the Swagger feature is enabled, shows the title on the Swagger UI.
- string - Optional
- Default: Project Title
- -d|--description A description of the project which determines the assembly description. If the Swagger feature is enabled, shows the description on the Swagger UI.
- string - Optional
- Default: Project Description
- -au|--author The name of the author of the project which determines the assembly author, company and copyright information.
- string - Optional
- Default: Project Author
- -e|--editorconfig Add a .editorconfig file to set a fixed code style.
- bool - Optional
- Default: true
- -g|--git Add a .gitignore file to stop Git from checking in temporary files and a .gitattributes to use git LFS.
- bool - Optional
- Default: true
- -R|--ReadMe Add a README.md markdown file describing the project.
- bool - Optional
- Default: true
- -twae|--treat-warnings-as-errors Treat warnings as errors.
- bool - Optional
- Default: true
- -s|--swagger Swagger is a format for describing the endpoints in your API and letting you try out your site using its user interface.
- bool - Optional
- Default: true
- -v|--versioning Enable API versioning to version API endpoints.
- bool - Optional
- Default: true
- -fh|--forwarded-headers If you use a load balancer, updates the request host and scheme using the X-Forwarded-Host and X-Forwarded-Proto HTTP headers.
- bool - Optional
- Default: true
- -hf|--host-filtering A white-list of host names allowed by the Kestrel web server e.g. example.com. You don't need this if you are using a properly configured reverse proxy.
- bool - Optional
- Default: true
- -rp|--reverse-proxy The internet facing reverse proxy web server you want to use in front of the primary web server to host the site.
- None - Use Kestrel directly instead of a reverse proxy.
- IIS - A flexible, secure and manageable Web server for hosting anything on the Web using Windows Server. Select this option if you are deploying your site to Azure web apps.
- NGINX - A free, open-source, cross-platform high-performance HTTP server and reverse proxy.
- Both - Support both reverse proxy web servers.
- Default: Both
- -cp|--cloud-provider Select which cloud provider you are using if any, to add cloud specific features.
- Azure - The Microsoft Azure cloud. Adds logging features that let you see logs in the Azure portal.
- None - No cloud provider is being used.
- Default: None
- -an|--analytics Monitor internal information about how your application is running, as well as external user information.
- Application Insights - Monitor internal information about how your application is running, as well as external user information using the Microsoft Azure cloud.
- None - Not using any analytics.
- Default: None
- -aik|--app-insights-key Your Application Insights instrumentation key e.g. 11111111-2222-3333-4444-555555555555.
- string - Optional
- Default: APPLICATION-INSIGHTS-INSTRUMENTATION-KEY
- -he|--https-everywhere Use the HTTPS scheme and TLS security across the entire site, redirects HTTP to HTTPS and adds a Strict Transport Security (HSTS) HTTP header with preloading enabled.
- bool - Optional
- Default: true
- -hp|--hsts-preload Enable Strict Transport Security (HSTS) HTTP header with preloading.
- bool - Optional
- Default: false / (*) true
- -c|--cors Browser security prevents a web page from making AJAX requests to another domain.
- bool - Optional
- Default: true
- -rc|--response-caching Response caching is allows the use of the [ResponseCache] attribute on your action methods. Cache settings (cache profiles) are stored in the configuration file and referred to by name.
- bool - Optional
- Default: true
- -rec|--response-compression Enables dynamic GZIP response compression of HTTP responses. Not enabled for HTTPS to avoid the BREACH security vulnerability.
- bool - Optional
- Default: true
- -xf|--xml-formatter Choose whether to use the XML input/output formatter and which serializer to use.
- DataContractSerializer - The default XML serializer you should use. Requires the use of [DataContract] and [DataMember] attributes.
- XmlSerializer - The alternative XML serializer which is slower but gives more control. Uses the [XmlRoot], [XmlElement] and [XmlAttribute] attributes.
- None - No XML formatter.
- Default: None
- -hc|--health-check A health-check endpoint that returns the status of this API and its dependencies, giving an indication of its health.
- bool - Optional
- Default: true
- -rt|--robots-txt Adds a robots.txt file to tell search engines not to index this site.
- bool - Optional
- Default: true
- -st|--security-txt Adds a security.txt file to allow people to contact you if they find a security vulnerability.
- bool - Optional
- Default: true
- -ht|--humans-txt Adds a humans.txt file where you can tell the world who wrote the application. This file is a good place to thank your developers.
- bool - Optional
- Default: true
- -htp|--http-port Port number to use for the HTTP endpoint in launchSettings.json.
- integer - Optional
- -p:hp|--https-port Port number to use for the HTTPS endpoint in launchSettings.json.
- integer - Optional
- -it|--integration-test Adds an integration test project.
- bool - Optional
- Default: true
- -sc|--style-cop Adds and enforces StyleCop analysers. NOTE: You may need to sort using statements if you enable this due to limitations in the dotnet new templating engine.
- bool - Optional
- Default: false / (*) true
- -do|--docker Adds an optimised Dockerfile to add the ability build a Docker image.
- bool - Optional
- Default: true
- -nr|--no-restore Skips the execution of 'dotnet restore' on project creation.
- bool - Optional
- Default: false / (*) true
- -not|--no-open-todo Skips opening the to-do list for the project in a web browser.
- bool - Optional
- Default: false / (*) true
- * Indicates the value used if the switch is provided without a value.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement