-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: if audience is filtering and no audiences exist on environments,…
… add all environments (#4220)
- Loading branch information
1 parent
2df58ae
commit 24d2d00
Showing
10 changed files
with
6,370 additions
and
4 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...rc/__test__/fixtures/audiences/fern-hack-override-environment-audience/definition/api.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: api | ||
environments: | ||
Production: https://www.yoursite.com | ||
Staging: https://www.staging.yoursite.com | ||
error-discrimination: | ||
strategy: status-code | ||
audiences: | ||
- external | ||
- internal | ||
- development |
62 changes: 62 additions & 0 deletions
62
...c/__test__/fixtures/audiences/fern-hack-override-environment-audience/definition/imdb.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
|
||
service: | ||
auth: false | ||
base-path: /movies | ||
endpoints: | ||
createMovie: | ||
audiences: | ||
- external | ||
docs: Add a movie to the database | ||
method: POST | ||
path: /create-movie | ||
request: CreateMovieRequest | ||
response: MovieId | ||
|
||
getMovie: | ||
docs: Retrieve a movie from the database based on the ID | ||
method: GET | ||
path: /{id} | ||
path-parameters: | ||
id: MovieId | ||
response: Movie | ||
errors: | ||
- MovieDoesNotExistError | ||
examples: | ||
# Success response | ||
- path-parameters: | ||
id: tt0111161 | ||
response: | ||
body: | ||
id: tt0111161 | ||
title: The Shawshank Redemption | ||
rating: 9.3 | ||
# Error response | ||
- path-parameters: | ||
id: tt1234 | ||
response: | ||
error: MovieDoesNotExistError | ||
body: tt1234 | ||
|
||
types: | ||
MovieId: | ||
type: string | ||
docs: The unique identifier for a Movie in the database | ||
|
||
Movie: | ||
properties: | ||
id: MovieId | ||
title: string | ||
rating: | ||
type: double | ||
docs: The rating scale out of ten stars | ||
|
||
CreateMovieRequest: | ||
properties: | ||
title: string | ||
rating: double | ||
|
||
errors: | ||
MovieDoesNotExistError: | ||
status-code: 404 | ||
type: MovieId |
17 changes: 17 additions & 0 deletions
17
...test__/fixtures/audiences/fern-hack-override-environment-audience/definition/webhooks.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
webhooks: | ||
userAdded: | ||
audiences: | ||
- external | ||
display-name: User Added | ||
method: POST | ||
payload: User | ||
|
||
userDeleted: | ||
display-name: User Added | ||
method: POST | ||
payload: User | ||
|
||
types: | ||
User: | ||
properties: | ||
name: string |
4 changes: 4 additions & 0 deletions
4
.../src/__test__/fixtures/audiences/fern-hack-override-environment-audience/fern.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"organization": "dsinghvi", | ||
"version": "0.30.7" | ||
} |
11 changes: 11 additions & 0 deletions
11
...or/src/__test__/fixtures/audiences/fern-hack-override-environment-audience/generators.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
default-group: local | ||
groups: | ||
local: | ||
audiences: | ||
- external | ||
generators: | ||
- name: fernapi/fern-typescript-node-sdk | ||
version: 0.9.5 | ||
output: | ||
location: local-file-system | ||
path: ../sdks/typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.