Skip to content
This repository was archived by the owner on Dec 10, 2021. It is now read-only.

Commit 9544c11

Browse files
committed
Post-rebase fix
1 parent 354ff10 commit 9544c11

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

src/__tests__/DefinitionGenerator.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as path from 'path';
22
import * as Serverless from 'serverless';
33
import { DefinitionGenerator } from '../DefinitionGenerator';
4-
import { merge } from '../utils';
4+
import _ = require('lodash');
55

66
class ServerlessInterface extends Serverless {
77
public service: any = {};
@@ -49,7 +49,7 @@ describe('OpenAPI Documentation Generator', () => {
4949

5050
const funcConfigs = sls.service.getAllFunctions().map((functionName) => {
5151
const func = sls.service.getFunction(functionName);
52-
return merge({ _functionName: functionName }, func);
52+
return _.merge({ _functionName: functionName }, func);
5353
});
5454

5555
docGen.readFunctions(funcConfigs);

test/project/openapi.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,43 @@ components:
189189
info:
190190
title: ''
191191
description: ''
192-
version: ae88c557-65e0-4feb-a885-ebe66a58cca8
192+
version: 96d3d004-1a24-4384-9df7-1e7416393223
193193
paths:
194194
/create:
195195
post:
196196
operationId: createUser
197197
summary: Create User
198198
description: Creates a user and then sends a generated password email
199+
requestBody:
200+
content:
201+
application/json:
202+
schema:
203+
$ref: '#/components/schemas/PutDocumentRequest'
204+
description: A user information object
205+
parameters:
206+
- name: username
207+
in: path
208+
description: The username for a user to create
209+
required: true
210+
schema:
211+
type: string
212+
pattern: '^[-a-z0-9_]+$'
213+
- name: membershipType
214+
in: query
215+
description: The user's Membership Type
216+
required: false
217+
allowEmptyValue: false
218+
schema:
219+
type: string
220+
enum:
221+
- premium
222+
- standard
223+
- name: SessionId
224+
in: cookie
225+
description: A Session ID variable
226+
required: false
227+
schema:
228+
type: string
199229
responses:
200230
'201':
201231
description: A user object along with generated API Keys

0 commit comments

Comments
 (0)