Skip to content

Commit bdde002

Browse files
committed
update spec to use localhost
1 parent 0a5cadd commit bdde002

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

modules/openapi-generator/src/test/resources/3_0/elixir/petstore-with-fake-endpoints-models-for-testing.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ paths:
3131
$ref: "#/components/schemas/Foo"
3232
/pet:
3333
servers:
34+
- url: "http://localhost/v2"
3435
- url: "http://petstore.swagger.io/v2"
3536
- url: "http://path-server-test.petstore.local/v2"
3637
- url: "http://{server}.swagger.io:{port}/v2"
@@ -1361,6 +1362,7 @@ paths:
13611362
schema:
13621363
$ref: "#/components/schemas/AllOfWithSingleRef"
13631364
servers:
1365+
- url: "http://localhost/v2"
13641366
- url: "https://petstore.swagger.io/v2"
13651367
- url: "http://{server}.swagger.io:{port}/v2"
13661368
description: petstore server

samples/client/petstore/elixir/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ You can override the URL of your server (e.g. if you have a separate development
3131
configuration files).
3232

3333
```elixir
34-
config :openapi_petstore, base_url: "https://petstore.swagger.io/v2"
34+
config :openapi_petstore, base_url: "http://localhost/v2"
3535
```
3636

3737
Multiple clients for the same API with different URLs can be created passing different `base_url`s when calling
3838
`OpenapiPetstore.Connection.new/1`:
3939

4040
```elixir
41-
client = OpenapiPetstore.Connection.new(base_url: "https://petstore.swagger.io/v2")
41+
client = OpenapiPetstore.Connection.new(base_url: "http://localhost/v2")
4242
```
4343

4444
[exdoc]: https://github.com/elixir-lang/ex_doc

samples/client/petstore/elixir/config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# General application configuration
88
import Config
99

10-
config :openapi_petstore, base_url: "https://petstore.swagger.io/v2"
10+
config :openapi_petstore, base_url: "http://localhost/v2"
1111

1212
# Import environment specific config. This must remain at the bottom
1313
# of this file so it overrides the configuration defined above.

samples/client/petstore/elixir/lib/openapi_petstore/connection.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ defmodule OpenapiPetstore.Connection do
88
Additional middleware can be set in the compile-time or runtime configuration:
99
1010
config :tesla, OpenapiPetstore.Connection,
11-
base_url: "http://petstore.swagger.io:80/v2",
11+
base_url: "http://localhost/v2",
1212
adapter: Tesla.Adapter.Hackney
1313
1414
The default base URL can also be set as:
1515
1616
config :openapi_petstore,
17-
:base_url, "http://petstore.swagger.io:80/v2"
17+
:base_url, "http://localhost/v2"
1818
"""
1919

2020
@default_base_url Application.compile_env(
2121
:openapi_petstore,
2222
:base_url,
23-
"http://petstore.swagger.io:80/v2"
23+
"http://localhost/v2"
2424
)
2525

2626
@default_scopes [

0 commit comments

Comments
 (0)