-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
136 additions
and
2 deletions.
There are no files selected for viewing
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
117 changes: 117 additions & 0 deletions
117
packages/cli/ete-tests/src/tests/add/__snapshots__/add.test.ts.snap
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,117 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`fern add fern add <generator> --group sdk 1`] = ` | ||
[ | ||
{ | ||
"contents": [ | ||
{ | ||
"contents": [ | ||
{ | ||
"contents": "name: api | ||
error-discrimination: | ||
strategy: status-code | ||
", | ||
"name": "api.yml", | ||
"type": "file", | ||
}, | ||
{ | ||
"contents": "# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
service: | ||
auth: false | ||
base-path: /movies | ||
endpoints: | ||
createMovie: | ||
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 | ||
", | ||
"name": "imdb.yml", | ||
"type": "file", | ||
}, | ||
], | ||
"name": "definition", | ||
"type": "directory", | ||
}, | ||
{ | ||
"contents": "{ | ||
"organization": "fern", | ||
"version": "0.0.0" | ||
}", | ||
"name": "fern.config.json", | ||
"type": "file", | ||
}, | ||
{ | ||
"contents": "default-group: local | ||
groups: | ||
local: | ||
generators: | ||
- name: fernapi/fern-typescript-node-sdk | ||
version: 0.9.5 | ||
output: | ||
location: local-file-system | ||
path: ../sdks/typescript | ||
typescript: | ||
generators: | ||
- name: fernapi/fern-typescript | ||
version: 0.7.2 | ||
", | ||
"name": "generators.yml", | ||
"type": "file", | ||
}, | ||
], | ||
"name": "fern", | ||
"type": "directory", | ||
}, | ||
] | ||
`; |
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