-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from zweidenker/development
Development
- Loading branch information
Showing
82 changed files
with
187 additions
and
71 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
source/BaselineOfOpenAPI.package/BaselineOfOpenAPI.class/instance/mocketry..st
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
baselines | ||
mocketry: spec | ||
spec baseline: 'Mocketry' with: [ | ||
spec repository: 'github://dionisiydk/Mocketry:v4.0.x'. ] | ||
spec repository: 'github://dionisiydk/Mocketry:v4.0.x'. ] |
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
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
10 changes: 10 additions & 0 deletions
10
...PI-Core-Tests.package/OAParsingTests.class/instance/testOpenAPISpecHasSortedParameters.st
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 @@ | ||
tests | ||
testOpenAPISpecHasSortedParameters | ||
| api string json parameters | | ||
api := OpenAPI fromString: self petStoreApiJsonString. | ||
string := api specString. | ||
json := NeoJSONObject fromString: string. | ||
parameters := (json paths at: #'/pets/{petId}') get parameters. | ||
self assert: parameters size equals: 2. | ||
self assert: parameters first name equals: #petId. | ||
self assert: parameters second name equals: #secondId |
3 changes: 3 additions & 0 deletions
3
source/OpenAPI-Core.package/OAHeaderParametersLocation.class/instance/extractParameter..st
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,3 @@ | ||
reading | ||
extractParameter: aCall | ||
^ parameter read: (aCall request headers at: parameter name ifAbsent: [ ^ nil ]) |
4 changes: 3 additions & 1 deletion
4
source/OpenAPI-Core.package/OAMediaTypeObject.class/instance/read.object..st
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
as yet unclassified | ||
read: value object: object | ||
^ schema read: value object: object | ||
^ [schema read: value object: object] on: JSONSchemaError do: [ :ex | | ||
OAInvalidFormat signal: ex description | ||
] |
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
3 changes: 0 additions & 3 deletions
3
source/OpenAPI-Core.package/OAOperation.class/instance/deprecated1..st
This file was deleted.
Oops, something went wrong.
10 changes: 7 additions & 3 deletions
10
source/OpenAPI-Core.package/OAOperation.class/instance/initializeValuesOn.fromRequest..st
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
reading | ||
initializeValuesOn: object fromRequest: request | ||
initializeValuesOn: aCall fromRequest: request | ||
parameters ifNotNil: [ | ||
parameters do: [ :each | | ||
each writeParameterValueOn: object request: request]]. | ||
each | ||
writeParameterValueOn: aCall parameterValueDelegate | ||
request: request]]. | ||
requestBody ifNotNil: [ | ||
(requestBody readFrom: request object: object) ] | ||
(requestBody | ||
readFrom: request | ||
object: aCall bodyValueDelegate ) ] |
4 changes: 4 additions & 0 deletions
4
source/OpenAPI-Core.package/OAOperation.class/instance/parametersSortedByName.st
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 @@ | ||
accessing | ||
parametersSortedByName | ||
parameters ifNil: [ ^ nil ]. | ||
^ parameters sorted: [ :a :b | a name < b name ] |
4 changes: 3 additions & 1 deletion
4
source/OpenAPI-Core.package/OAParameter.class/instance/extractParameter..st
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
11 changes: 0 additions & 11 deletions
11
source/OpenAPI-Core.package/OAParameter.class/instance/writeParameterValueOn..st
This file was deleted.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
source/OpenAPI-Core.package/OAPathParameterLocation.class/instance/extractParameter..st
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
2 changes: 1 addition & 1 deletion
2
source/OpenAPI-Core.package/OAPathParameterLocation.class/instance/write.value.to..st
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
as yet unclassified | ||
writing | ||
write: key value: value to: builder | ||
builder addPathParameter: key value: value |
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
...e/OpenAPI-REST-Tests.package/OAMissingHeaderPetCall.class/class/parameterOptionalPetId.st
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,9 @@ | ||
accessing | ||
parameterOptionalPetId | ||
<openApiParameter: #( common )> | ||
^ OAParameter new | ||
name: 'Optional-Pet-Id'; | ||
in: #header; | ||
beInteger; | ||
required: false; | ||
description: 'The internal id of the pet in the pet store' |
9 changes: 9 additions & 0 deletions
9
...e/OpenAPI-REST-Tests.package/OAMissingHeaderPetCall.class/class/parameterRequiredPetId.st
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,9 @@ | ||
accessing | ||
parameterRequiredPetId | ||
<openApiParameter: #( common )> | ||
^ OAParameter new | ||
name: 'Required-Pet-Id'; | ||
in: #header; | ||
beInteger; | ||
required: true; | ||
description: 'The internal id of the pet in the pet store' |
3 changes: 3 additions & 0 deletions
3
source/OpenAPI-REST-Tests.package/OAMissingHeaderPetCall.class/class/path.st
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,3 @@ | ||
accessing | ||
path | ||
^ '/pets/header-missing' |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
source/OpenAPI-REST-Tests.package/OAMissingHeaderPetCall.class/instance/get.st
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,3 @@ | ||
public | ||
get | ||
response := self response: Dictionary new status: 200 contentType: 'application/json' |
8 changes: 3 additions & 5 deletions
8
...package/OARESTTests.class/properties.json → ...issingHeaderPetCall.class/properties.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 |
---|---|---|
@@ -1,15 +1,13 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "TestCase", | ||
"super" : "OpenAPITestCall", | ||
"category" : "OpenAPI-REST-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"serverDelegate", | ||
"server", | ||
"client" | ||
"requiredPetId" | ||
], | ||
"name" : "OARESTTests", | ||
"name" : "OAMissingHeaderPetCall", | ||
"type" : "normal" | ||
} |
12 changes: 0 additions & 12 deletions
12
source/OpenAPI-REST-Tests.package/OARESTTests.class/instance/setUp.st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
source/OpenAPI-REST-Tests.package/OARESTTests.class/instance/tearDown.st
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
source/OpenAPI-REST-Tests.package/OARESTTests.class/instance/testPetCall.st
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
source/OpenAPI-REST-Tests.package/OARESTTests.class/instance/testPetPostCall.st
This file was deleted.
Oops, something went wrong.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
source/OpenAPI-REST-Tests.package/OpenAPIBasePetCall.class/properties.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,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "OpenAPICall", | ||
"category" : "OpenAPI-REST-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "OpenAPIBasePetCall", | ||
"type" : "normal" | ||
} |
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
...EST-Tests.package/OpenAPIHeaderTests.class/instance/testMissingOptionalHeaderParameter.st
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,13 @@ | ||
tests | ||
testMissingOptionalHeaderParameter | ||
|
||
| response | | ||
Pet instances add: (Pet new id: 1; name: 'testpet'; age: 1). | ||
response := self delegate handleRequest: (ZnClient new | ||
url: '/pets/header-missing'; | ||
headerAt: 'Required-Pet-Id' add: '123'; | ||
method: #GET; | ||
prepareRequest) request. | ||
self assert: response isSuccess | ||
|
||
|
14 changes: 14 additions & 0 deletions
14
...EST-Tests.package/OpenAPIHeaderTests.class/instance/testMissingRequiredHeaderParameter.st
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,14 @@ | ||
tests | ||
testMissingRequiredHeaderParameter | ||
|
||
| response | | ||
Pet instances add: (Pet new id: 1; name: 'testpet'; age: 1). | ||
response := self delegate handleRequest: (ZnClient new | ||
url: '/pets/header-missing'; | ||
method: #GET; | ||
prepareRequest) request. | ||
self deny: response isSuccess. | ||
self assert: response status equals: 400. | ||
self assert: (response contents includesSubstring: 'Required-Pet-Id') | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
source/OpenAPI-REST-Tests.package/OpenAPIHeaderTests.class/properties.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,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "OpenAPIRestTests", | ||
"category" : "OpenAPI-REST-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "OpenAPIHeaderTests", | ||
"type" : "normal" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
source/OpenAPI-REST-Tests.package/OpenAPIPetCall.class/class/responseOk.st
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,7 @@ | ||
as yet unclassified | ||
responseOk | ||
<openApiResponse: #(get) status: #(200) contentType: #('application/json')> | ||
^ OAMediaTypeObject new | ||
schema: { | ||
#name -> (JSONSchema string). | ||
#age -> (JSONSchema integer) } asJSONSchema |
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...kage/OpenAPIPetCall.class/properties.json → ...kage/OpenAPIPetCall.class/properties.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...PIPetCollectionCall.class/properties.json → ...PIPetCollectionCall.class/properties.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
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
source/OpenAPI-REST-Tests.package/OpenAPIRestPetTests.class/instance/rootCallClass.st
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,3 @@ | ||
tests | ||
rootCallClass | ||
^ OpenAPIBasePetCall |
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
source/OpenAPI-REST-Tests.package/OpenAPIRestPetTests.class/properties.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,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "OpenAPIRestTests", | ||
"category" : "OpenAPI-REST-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "OpenAPIRestPetTests", | ||
"type" : "normal" | ||
} |
Empty file.
File renamed without changes.
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
3 changes: 3 additions & 0 deletions
3
source/OpenAPI-REST-Tests.package/OpenAPIRestTests.class/instance/rootCallClass.st
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,3 @@ | ||
tests | ||
rootCallClass | ||
^ OpenAPITestCall |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...age/OpenAPIRestTest.class/properties.json → ...ge/OpenAPIRestTests.class/properties.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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "TestCase", | ||
"category" : "OpenAPI-REST", | ||
"category" : "OpenAPI-REST-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "OpenAPIRestTest", | ||
"name" : "OpenAPIRestTests", | ||
"type" : "normal" | ||
} |
Empty file.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
source/OpenAPI-REST-Tests.package/OpenAPISpecCall.class/properties.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,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "OpenAPIBasePetCall", | ||
"category" : "OpenAPI-REST-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "OpenAPISpecCall", | ||
"type" : "normal" | ||
} |
Empty file.
4 changes: 2 additions & 2 deletions
4
...age/OpenAPISpecCall.class/properties.json → ...age/OpenAPITestCall.class/properties.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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "OpenAPICall", | ||
"category" : "OpenAPI-REST", | ||
"category" : "OpenAPI-REST-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "OpenAPISpecCall", | ||
"name" : "OpenAPITestCall", | ||
"type" : "normal" | ||
} |
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.