`@sapui5/ts-types-esm` - `MockServer.setRequests` has no type for `requests` array
See original GitHub issueaccording to the docs:
/**
* Setter for property `requests`.
*
* Default value is is `[]`
*
* Each array entry should consist of an object with the following properties / values:
*
*
* - **method : "GET"|"POST"|"DELETE|"PUT"**
* (any HTTP verb)
* - **path : "/path/to/resource"**
* The path is converted to a regular expression, so it can contain normal regular expression syntax. All
* regular expression groups are forwarded as arguments to the `response` function. In addition to this,
* parameters can be written in this notation: `:param`. These placeholder will be replaced by regular expression
* groups.
* - **response : function(xhr, param1, param2, ...) { }**
* The xhr object can be used to respond on the request. Supported methods are:
* `xhr.respond(iStatusCode, mHeaders, sBody)`
* `xhr.respondJSON(iStatusCode, mHeaders, oJsonObjectOrString)`. By default a JSON header is set for response
* header
* `xhr.respondXML(iStatusCode, mHeaders, sXmlString)`. By default an XML header is set for response header
*
* `xhr.respondFile(iStatusCode, mHeaders, sFileUrl)`. By default the mime type of the file is set for
* response header
*/
but it’s type is just object
:
setRequests(
/**
* new value for property `requests`
*/
requests: object[]
): void;
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
400 response creating expectation with json array ... - GitHub
I would expect this request to get successfully registered as a json type. MockServer Log. 2020-01-10 19:15:24 org.mockserver.log.
Read more >Mock non-OData RESTfull services using SAPUI5 MockServer
The SAPUI5/OpenUI5 MockServer component is a simple yet powerful tool to ... MockServer setRequests gives a good description of the request ...
Read more >Add your own requests to SAPUI5 MockServer -
This week I had a requirement to create a simple Function Import, the function calls the backend SAP system to determine whether or...
Read more >Step 2: Creating a Mock Server to Simulate Data - SAPUI5 SDK
start(); Log.info("Running the app with mock data"); } }; });. Now we can write the code to initialize the OData V2 mock server...
Read more >How to return custom object with byte array field using ...
You should not consume pdf file directly and put it into object to response as a byte array, because mock server will add ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually it’s not 4 weeks, but 8 weeks: the release around X-Mas is skipped and 1.98 is scheduled for around January 26th, sorry.
By default, fixes will only go into new minor releases, not in patch versions. The fix (https://github.com/SAP/openui5/commit/673ea04afd8a6ff14824d7e2e2dbc9027d2c668b#diff-2c1e10c2936aeacdc409f7a8d3785deba7d54a225fe657db01dbbf90b9f33b5f) apparently has missed the codesplit for the 1.97 release (I still see the old documentation in the 1.97 definitions) and should hence be in 1.98 in ~4 weeks. Please re-open in case it is not. Thanks!