forked from loafle/openapi-generator-original
* Allow the baseUrl of elixir APIs to be overridden * Run generator * Add missing `:` * Update modules/openapi-generator/src/main/resources/elixir/connection.ex.mustache Co-authored-by: Michael Ramstein <633688+mrmstn@users.noreply.github.com> * Generate sample with new change Co-authored-by: Joe Eifert <joe@databerg.rocks> Co-authored-by: Michael Ramstein <633688+mrmstn@users.noreply.github.com>
34 lines
1.0 KiB
Markdown
34 lines
1.0 KiB
Markdown
# OpenapiPetstore
|
|
|
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
|
|
### Building
|
|
|
|
To install the required dependencies and to build the elixir project, run:
|
|
```
|
|
mix local.hex --force
|
|
mix do deps.get, compile
|
|
```
|
|
|
|
## Installation
|
|
|
|
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
|
|
by adding `openapi_petstore` to your list of dependencies in `mix.exs`:
|
|
|
|
```elixir
|
|
def deps do
|
|
[{:openapi_petstore, "~> 0.1.0"}]
|
|
end
|
|
```
|
|
|
|
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
|
|
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
|
|
be found at [https://hexdocs.pm/openapi_petstore](https://hexdocs.pm/openapi_petstore).
|
|
|
|
|
|
## Configuration
|
|
|
|
You can override the URL of your server (e.g. if you have a separate development and production server in your configuration files.
|
|
```elixir
|
|
config :open_api_petstore, base_url: "http://petstore.swagger.io:80/v2"
|
|
``` |