instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stleary__JSON-java__820 | stleary/JSON-java | 820 | defect | b5b9f636ff150fbad9dce3cd3e77a2747ac73190 | c05d7058ff7bfd0a1520cd8bcf94eebd2b9a11be | Close XML tag explicitly for empty tags with configuration. | Added configuration option - closeEmptyTag
When this flag is set to true, all the empty tags will be closed using explicit start and end tag. | diff --git a/src/main/java/org/json/XML.java b/src/main/java/org/json/XML.java
index 533192313..efdfd9f66 100644
--- a/src/main/java/org/json/XML.java
+++ b/src/main/java/org/json/XML.java
@@ -877,12 +877,25 @@ private static String toString(final Object object, final String tagName, final
}
... | 1 | 1 | 1 | [{"id": "G0", "claim": "The withCloseEmptyTag method should follow the convention of the other with* methods: clone 'this', update the clone with the new property value, and return the clone instead of mutating and returning this.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
stleary__JSON-java__823 | stleary/JSON-java | 823 | defect | 92991770ca9f5e12d687bd9f6147d10e8baedd2e | 2dd0f830506ac1f6e831aabc9d2e7635f3e16e76 | JSON parsing self reference object and array | Fix for issue #743
Self reference issue found in JSONObject and JSONArray | diff --git a/src/main/java/org/json/JSONArray.java b/src/main/java/org/json/JSONArray.java
index ed7982f8a..eec7852d5 100644
--- a/src/main/java/org/json/JSONArray.java
+++ b/src/main/java/org/json/JSONArray.java
@@ -149,11 +149,18 @@ public JSONArray(String source) throws JSONException {
* A Collectio... | 2 | 2 | 2 | [{"id": "G0", "claim": "The hardcoded recursion depth limit value of 1000 needs unit tests that exercise nested JSON texts with depth 999, 1000, and 1001.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The depth limit of 1000 may be too high (memory cou... | null |
stleary__JSON-java__857 | stleary/JSON-java | 857 | defect | 77c899d325904578e62c3493b75c12379534db24 | 6dc1ed0a02924fba5498900149e31da90f8c06e2 | Implemented custom duplicate key handling (#840) | Supports: throw a JSONException (by default), ~ignore (not overwritting)~, overwrite ~or merge into a JSONArray~;
also with tests in a separated file
xD, thanks for reviewing | diff --git a/src/main/java/org/json/JSONObject.java b/src/main/java/org/json/JSONObject.java
index 4c08b0b9c..706992a43 100644
--- a/src/main/java/org/json/JSONObject.java
+++ b/src/main/java/org/json/JSONObject.java
@@ -15,17 +15,8 @@
import java.lang.reflect.Modifier;
import java.math.BigDecimal;
import java.math.... | 6 | 4 | 2 | [{"id": "G0", "claim": "The proposed changes should be discussed in issue #840 before submitting the PR, and at this time only the throw action would be allowed unless a case is made for the other duplicate-key actions.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1... | null |
stleary__JSON-java__867 | stleary/JSON-java | 867 | defect | 77c899d325904578e62c3493b75c12379534db24 | c010033591c192a0821bdd8fe23bc61cdc6fe738 | Improve toString Performance: Use StringBuilderWriter for toString methods | Implementation for https://github.com/stleary/JSON-java/issues/863
Using a `StringBuilder` wrapped in a new `StringBuilderWriter` class to improve the performance for the default `toString` methods.
using the not synchronised `StringBuilder` instead of the `StringBuffer` results in a ~37% faster `toString` method... | diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index 63540cc6c..92b55283a 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -52,6 +52,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Compile Java ${{ matrix.ja... | 8 | 8 | 3 | [{"id": "G0", "claim": "Remove the MAVEN_OPTS -Xss4m compiler stack-size workaround from the build pipeline.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Revert all changes in the JSONObject(JSONTokener) constructor back to the original code.", "catego... | null |
stleary__JSON-java__877 | stleary/JSON-java | 877 | defect | 45dede448c1188a052ad7e81a48cf629755efa9a | 49de92224d0a463947bd68316cd75c13d02a8ee7 | StrictMode Implementation for JSONArray | This fixes issue #871
# StrictMode Implementation for JSONArray
## JSONParserConfiguration
Followed the same pattern already in place in JSONParserConfiguration.
```java
public class JSONParserConfiguration extends ParserConfiguration {
/**
* This flag, when set to true, instructs the parser ... | diff --git a/src/main/java/org/json/JSONArray.java b/src/main/java/org/json/JSONArray.java
index df0b2994b..1e2c32cba 100644
--- a/src/main/java/org/json/JSONArray.java
+++ b/src/main/java/org/json/JSONArray.java
@@ -75,19 +75,31 @@ public JSONArray() {
}
/**
- * Construct a JSONArray from a JSONTokener... | 8 | 7 | 2 | [{"id": "G0", "claim": "The pull request's code must be updated to compile with Java 6, which the project maintains for backwards compatibility with Android developers.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "All refactorings not directly rel... | null |
stleary__JSON-java__879 | stleary/JSON-java | 879 | defect | 45dede448c1188a052ad7e81a48cf629755efa9a | d69d5e284b3ee797f3950d80eb9dfc571a944284 | extend syntax error information | The syntax error contains only the index of the not parsable character. It might be helpful to indclude more information like the current character and why it is not allowed at this place. | diff --git a/src/main/java/org/json/JSONTokener.java b/src/main/java/org/json/JSONTokener.java
index 0bc6dfb68..8b7a34a33 100644
--- a/src/main/java/org/json/JSONTokener.java
+++ b/src/main/java/org/json/JSONTokener.java
@@ -299,7 +299,8 @@ public String nextString(char quote) throws JSONException {
case 0... | 8 | 8 | 2 | [{"id": "G0", "claim": "The pull request should include unit tests for the new syntax-error exception message behavior.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The pull request accidentally rewrote the JSONMLTest fixture string from 'multi line' ... | null |
stleary__JSON-java__961 | stleary/JSON-java | 961 | defect | 6452a6f38dd1efdee9e651313317a4349d2b776d | 5d1c789490627ddfa59f17252954ed62ccca6a59 | Option to store null value in JSONObject when parsing a map | This PR provides a new JSONParserConfiguration option to allow a Java `Map.of("foo", null)` to be converted into `{"foo": null}` instead of `{}`.
See also Issue #296 and PR #338, which was rejected due to API concerns. Since now we have a proper configuration object these concerns are addressed.
| diff --git a/src/main/java/org/json/JSONObject.java b/src/main/java/org/json/JSONObject.java
index d50fff73b..73835d497 100644
--- a/src/main/java/org/json/JSONObject.java
+++ b/src/main/java/org/json/JSONObject.java
@@ -332,7 +332,7 @@ private JSONObject(Map<?, ?> m, int recursionDepth, JSONParserConfiguration json
... | 3 | 3 | 1 | [{"id": "G0", "claim": "The javadoc comment on withJavaNullAsJsonNull is wrong: it was copied from the duplicate-key handling and does not describe null handling.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The property name javaNullAsJsonNull ... | null |
stleary__JSON-java__983 | stleary/JSON-java | 983 | defect | 24fafcffebf2f217fe7aa2d60438019893a0a509 | dadc3e59dc3ae44f678a1d5f1554edb93a5adb80 | Allow retaining null-valued bean properties in JSONObjects | This commit includes changes to consider JSONParserConfiguration.isUseNativeNulls() to decide if a null field to be serialized or not corresponding to issue #982
Also, includes the test case to test the same. | diff --git a/src/main/java/org/json/JSONObject.java b/src/main/java/org/json/JSONObject.java
index a1664f708..6b3b87eb6 100644
--- a/src/main/java/org/json/JSONObject.java
+++ b/src/main/java/org/json/JSONObject.java
@@ -401,12 +401,17 @@ private JSONObject(Map<?, ?> m, int recursionDepth, JSONParserConfiguration json
... | 2 | 2 | 0 | [{"id": "G0", "claim": "The test should assert on the jsonObject directly (e.g. checking keys and values) instead of converting it to a text string and asserting on substring containment.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A default case sho... | null |
stlink-org__stlink__420 | stlink-org/stlink | 420 | defect | 486cc10c7081b8c85e8b8a1c8f70a6f178768e0c | 6045cb31eb94e9b8b7e1eb78140fa6cb72bcecf6 | WIP: Fix compiler warnings | Trying to fix all warnings noticed by #402 for the different builds:
- [x] linux / gcc / autotools
- [x] linux / clang / autotools
- [x] linux / gcc-5 / cmake
- [x] linux / clang-3.8 / cmake
- [x] osx / clang / cmake
- [x] osx / clang / autotools
| diff --git a/include/stlink.h b/include/stlink.h
index 72eebb70f..fc63199f9 100644
--- a/include/stlink.h
+++ b/include/stlink.h
@@ -15,6 +15,15 @@
extern "C" {
#endif
+#ifdef UNUSED
+#elif defined(__GNUC__)
+#define UNUSED(x) UNUSED_ ## x __attribute__((unused))
+#elif defined(__LCLINT__)
+#define UNUSED(x) /*@unu... | 9 | 9 | 4 | [{"id": "G0", "claim": "Typedefs are forbidden under the planned checkpatch/Linux codestyle, so the `reg` typedef should be changed to something like `struct stlink_reg`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The `include_directories` for the ... | null |
stlink-org__stlink__602 | stlink-org/stlink | 602 | defect | 55c057296ad15fa6de9909206098bd4eed8f6311 | 2852a7668d184b45c18cf7db42fb6aa29bf2224a | Stop the sulk with GPL2016 on Windows | Trying to use stlink with GNAT/GPL2016/GPS was an exercise in frustration on Windows (no, another OS is **NOT** an option). GPS would sulk trying to flash/debug. However, running st-util then flash/debug would work, but one copy of st-util would crash.
These changes result in an st-util.exe that builds in Visual S... | diff --git a/CMakeLists.txt b/CMakeLists.txt
index afa7fdeff..389203e40 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.8.7)
+set(CMAKE_USER_MAKE_RULES_OVERRIDE cmake/c_flag_overrides.cmake)
project(stlink C)
set(PROJECT_DESCRIPTION "Open source version of the STMicr... | 5 | 5 | 1 | [{"id": "G0", "claim": "Prefer generating the MSVC 2017 project files with CMake instead of committing per-IDE/per-compiler project files to the repository.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The GPL-licensed glibc getopt sources cannot be mi... | null |
stlink-org__stlink__917 | stlink-org/stlink | 917 | defect | 38c8b8b499f1d9e87db214e9fb2c144e593c8a08 | e97eaa329a43dde694851cf27b55aa3891f9e85e | Fix st-flash write 0xff ignored issue | strcpy function will copy string with the ending NULL while strlen will not count NULL into length.
Added one commandline argument `--opt` to enable optimization of ending empty bytes. | diff --git a/doc/man/st-flash.1 b/doc/man/st-flash.1
index 36df7daa8..c2654f280 100644
--- a/doc/man/st-flash.1
+++ b/doc/man/st-flash.1
@@ -1,52 +1,55 @@
-.\" Automatically generated by Pandoc 2.4
+.\" Automatically generated by Pandoc 2.9
.\"
-.TH "st\-flash" "1" "Feb 2018" "Open Source STMicroelectronics Stlink Too... | 2 | 2 | 0 | [{"id": "G0", "claim": "Use 4 spaces instead of tab-spaces for indentation in the --flash= option parsing in src/tools/flash_opts.c, because the mixed tabs read inconsistently on different systems.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "... | null |
stlink-org__stlink__953 | stlink-org/stlink | 953 | defect | 9b207de880918c99dbf14d832ab0d787cc09ed45 | 931141869e17f72a01dc14ebd27cca8f86348c32 | [feature] Adjust the JTAG/SWD frequency via cmdline option | Fix https://github.com/stlink-org/stlink/issues/893
* Add --freq argument for st-flash | diff --git a/include/stlink.h b/include/stlink.h
index 74c366d1c..ffa65b332 100644
--- a/include/stlink.h
+++ b/include/stlink.h
@@ -159,6 +159,8 @@ typedef struct flash_loader {
char serial[STLINK_SERIAL_MAX_SIZE];
int serial_size;
+ int freq; // set by stlink_open_usb(), values: S... | 4 | 3 | 1 | [{"id": "G0", "claim": "The test was missing verification of the freq option and one case expected the wrong freq value, which the author says he is fixing.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new freq field in struct flash_opts should ca... | null |
stm32-rs__stm32f3xx-hal__239 | stm32-rs/stm32f3xx-hal | 239 | defect | 052411d13071ab280c3ba979cc4c464cb341f7e6 | f6be7a79a2ffd35f620ad75a0d1c42b239d6d8e5 | Add config struct for Serial | This is about to add more configuration options like data bits and parity to `Serial`. Baudrate and the new parameters are provided in a struct `Config` which replaces the baud rate parameter of `Serial::new` and could be converted from a baud rate so that it would not break existing code.
I've created this draft P... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a318b8312..e0e6bed6c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- `ld` feature, which enables the memory.x generation ([#216])
- Implement `DelayMs` for `Milliseconds` and `DelayU... | 20 | 13 | 2 | [{"id": "G0", "claim": "The config module's public re-export of the time-rate `Baud`/`Extensions` items is unnecessary because the extension traits are already pulled in via the crate prelude.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Consider imple... | null |
stm32duino__Arduino_Core_STM32__1547 | stm32duino/Arduino_Core_STM32 | 1,547 | defect | 7e56d54e34b46450cf1ab5360f7f853bdcdc9771 | 5c1ecd8229cb7476cb81e1a21bf9ce618c249518 | Feature/G030CxT | This PR fixes/implements the following **bugs/features**
* [x] G030CxT variants
<!-- You can skip this if you're fixing a typo or adding an app to the Showcase. -->
The variant G030CxT was missing both default clock and the linker scripts.
<!-- Example: When "Adding a function to do X", explain why it is ne... | diff --git a/README.md b/README.md
index 25d1436758..73bffb1588 100644
--- a/README.md
+++ b/README.md
@@ -293,6 +293,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
+| :green_heart:... | 2 | 2 | 1 | [{"id": "G0", "claim": "The README status row for the new G030C6/C8 generic board should use the yellow-heart pending marker with a bold **2.2.0** release tag instead of a green heart and italic markup.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"... | null |
stm32duino__Arduino_Core_STM32__1638 | stm32duino/Arduino_Core_STM32 | 1,638 | defect | b8756be9e028dfa1651591e2d2ca956773189669 | 8c844e22ab65033caba9695a4ceca77ff8075a2f | Adding new variant for Generic G070xxT | **Summary**
<!-- Summary of the PR -->
This PR fixes/implements the following **bugs/features**
* [x] Adding new variant for Generic G070CBT/KBT/RBT
I run the AStyle check and Action locally before commit, all passed.
| diff --git a/README.md b/README.md
index 0ea8b73334..354addb44a 100644
--- a/README.md
+++ b/README.md
@@ -301,6 +301,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| :green_heart: | STM32G031K4<br>STM32G031K6<br>STM32G031K8 | Generic Board | *2.0.0* | |
| :green_heart: | STM32... | 1 | 1 | 0 | [{"id": "G0", "claim": "Split the README supported-boards row into three lines (one per variant directory G070CBT, G070KBT, G070RBT) and bold the version as **2.3.0** instead of *2.3.0*.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stm32duino__Arduino_Core_STM32__1794 | stm32duino/Arduino_Core_STM32 | 1,794 | defect | 2f89ed52f1772e5050b8464422eb338ae64991cc | dd9939d7a16cfc682dfcbdcce84d92ea26f7e2f7 | Added Generic F2xx Boards | | :yellow_heart: | STM32F205RB<br>STM32F205RC<br>STM32F205RE<br>STM32F205RF | Generic Board | **2.4.0** | |
| :yellow_heart: | STM32F205VB<br>STM32F205VC<br>STM32F205VE<br>STM32F205VF<br>STM32F205VG | Generic Board | **2.4.0** | |
| :yellow_heart: | STM32F205ZC<br>STM32F205ZE<br>STM32F205ZF<br>STM32F205ZG | Generic... | diff --git a/README.md b/README.md
index f1e08f9540..90e8aabc57 100644
--- a/README.md
+++ b/README.md
@@ -213,7 +213,17 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| Status | Device(s) | Name | Release | Notes |
| :----: | :-------: | ---- | :-----: | :---- |
+| :yellow_hear... | 1 | 1 | 1 | [{"id": "G0", "claim": "The linker script files added by this PR are missing parentheses around the memory attributes in the MEMORY block (e.g. `RAM xrw` instead of `RAM (xrw)`).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
stm32duino__Arduino_Core_STM32__1831 | stm32duino/Arduino_Core_STM32 | 1,831 | defect | 15cf923be8765be6150ba02d5b6f284022e8fcab | 4d835d56455c24ab798bf76cc402d8454270a356 | Add Nucleo F722ZE board | Fixes #1259
Tested:
- Serial
- USB
- I2C
- SPI | diff --git a/README.md b/README.md
index 5ef4645958..4b0d6461cb 100644
--- a/README.md
+++ b/README.md
@@ -87,6 +87,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| :----: | :-------: | ---- | :-----: | :---- |
| :green_heart: | STM32F207ZG | [Nucleo F207ZG](http://www.st.com/e... | 5 | 5 | 2 | [{"id": "G0", "claim": "The new-board README row should use the :green_yellow: status emoji and a bold release (**2.4.0**) to match the convention for newly added boards.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Define LED_GREEN as PB0 first... | null |
stm32duino__Arduino_Core_STM32__1987 | stm32duino/Arduino_Core_STM32 | 1,987 | defect | 7fc137530142bca3f20d2b53e5e3c95b618286b3 | ec51486386388799dd8fb6a7b80898218675562b | Add SparkFun MicroMod STM32F405 | **Summary**
Add support for the SparkFun MicroMod STM32F405
**Validation**
Tested locally with the `CheckVariant` sketch.
| diff --git a/CI/build/conf/cores_config.json b/CI/build/conf/cores_config.json
index 8aa38d2d4d..30c8d979a8 100644
--- a/CI/build/conf/cores_config.json
+++ b/CI/build/conf/cores_config.json
@@ -287,6 +287,7 @@
"MALYANM200_F103CB",
"MALYANM300_F070CB",
"MAPLEMINI_F103CB",
+ ... | 11 | 10 | 6 | [{"id": "G0", "claim": "The pull request replaced the README table of contents with a nested copy of the page TOC inside the 'Supported boards' section; those extra links (introduction, etc.) should be removed so only the boards list remains.", "category": "documentation", "verdict": "supported", "priority": "P2", "sco... | null |
stm32duino__Arduino_Core_STM32__2405 | stm32duino/Arduino_Core_STM32 | 2,405 | defect | 6c0c0066349d0a2b78286703f85e5511f263614a | 8501e3e6457f785f0b3adab99441d7265a96cea1 | Define generic boards for STM32L051K8U and -T | This PR adds generic board definitions for the STM32L051K8U and STM32L051K8T variants. They are generated using STM32Cube, following [the documentation in the wiki](https://github.com/stm32duino/Arduino_Core_STM32/wiki/Add-a-new-variant-(board)). | diff --git a/README.md b/README.md
index c1a0eb5d8f..4672e9e07a 100644
--- a/README.md
+++ b/README.md
@@ -617,6 +617,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| :green_heart: | STM32L041G6 | Generic Board | *2.4.0* | |
| :green_heart: | STM32L041K6T | Generic Board | *2.... | 4 | 4 | 3 | [{"id": "G0", "claim": "The README support-table row for STM32L051K8 should use the yellow heart emoji and bold *2.8.0* as for other newly supported boards.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request should also add the L051... | null |
stm32duino__Arduino_Core_STM32__2424 | stm32duino/Arduino_Core_STM32 | 2,424 | defect | edd178502bb88ae6449b7352f6c490043b5d041f | ff1eb1522c19a1d17414fa5a9d1ec1cabde124ce | Add variant: Generic H563RGT, H563RIT, H573RIT | Like the #2423, there is no code for peripheral configuration.
This PR implements the following **features**
* [x] New Variant: Generic STM32H563RGT, STM32H563RIT, STM32H573RIT
| diff --git a/README.md b/README.md
index abe6c00912..b341773cbc 100644
--- a/README.md
+++ b/README.md
@@ -542,8 +542,10 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| :----: | :-------: | ---- | :-----: | :---- |
| :green_heart: | STM32H503RB | Generic Board | *2.7.0* | |
| ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The README board table should list the boards as supported since **2.8.1** instead of the not-yet-released *2.9.0* for the STM32H563RG/RI and STM32H573RI rows.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
stm32duino__Arduino_Core_STM32__2506 | stm32duino/Arduino_Core_STM32 | 2,506 | defect | 6e60087cabd8a037169d0ed6df4edc1f2d457bd9 | d1c8932eba1314d962889f439f3fdca7f16832ae | Fix H563ZI clock config. | ## Pull Request template
Please, Make sure that your PR is not a duplicate.
Search among the [Pull request](https://github.com/stm32duino/Arduino_Core_STM32/pulls) before creating one.
IMPORTANT: Please review the [CONTRIBUTING.md](https://github.com/stm32duino/Arduino_Core_STM32/blob/main/CONTRIBUTING.md) file ... | diff --git a/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c b/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c
index 884d196ddf..053bdac07b 100644
--- a/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c
+++ b/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c
@@ -34,25 +34,21 @@ WEAK void SystemC... | 2 | 2 | 2 | [{"id": "G0", "claim": "The new USB clock configuration is not correct because RCC_USBCLKSOURCE_PLL3Q yields 50 MHz instead of the required 48 MHz.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The LPUART1 clock source should be kept at a lower val... | null |
stm32duino__Arduino_Core_STM32__2848 | stm32duino/Arduino_Core_STM32 | 2,848 | defect | 60888f163a67c3f514a9030d501ee50f6e458de2 | 114fd7248220cb4c788fa23f6d17451c0ccc8fab | variant(h7): add Nucleo-H745ZI-Q support | Fixes #2090
| diff --git a/README.md b/README.md
index cfcbec4872..f0b5930e7a 100644
--- a/README.md
+++ b/README.md
@@ -115,6 +115,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| :green_heart: | STM32H563ZI | [Nucleo H563ZI](https://www.st.com/en/evaluation-tools/nucleo-h563zi.html) | *2.6.... | 3 | 3 | 1 | [{"id": "G0", "claim": "The pull request should also add boards.txt entries for the other ZI-pinout generic MCUs, Generic H745ZGTx and Generic H755ZITx, not only Generic H745ZITx.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The generic H7 boards ... | null |
stoically__temporary-containers__429 | stoically/temporary-containers | 429 | defect | 3db32fa992dba950f0adf179f1d1c4a8c3964e74 | 8ed969a44cf1e9a279c2b4b675cba066cccc49e6 | feat: automatic re-isolation after n seconds (#315) | Add handler logic in isolation.ts
Add a new function setIsolation, to consolidate some overlapping code
Replace code in commands.ts with setIsolation function
Update addIsolationInactiveBadge in browseraction.ts to accept an optional counter
Closes #315 | diff --git a/src/background/browseraction.ts b/src/background/browseraction.ts
index 0971d30c..ede8d387 100644
--- a/src/background/browseraction.ts
+++ b/src/background/browseraction.ts
@@ -97,12 +97,12 @@ export class BrowserAction {
});
}
- async addIsolationInactiveBadge(): Promise<void> {
+ async addIs... | 6 | 5 | 1 | [{"id": "G0", "claim": "Automatically re-enabling isolation should behave sensibly across Firefox shutdown/restart: if the browser closes while the countdown ticks, isolation stays disabled after restart, so the re-enable target time might be stored in storage (not preferences) and checked during initialization.", "cat... | null |
stolostron__multicloud-operators-subscription__202 | stolostron/multicloud-operators-subscription | 202 | defect | 4438efb3aa681589cd12380149d50d457ab0ea8f | b84ff2a233361c36e32b13514613437c5f5ba39f | fix the retry logic of helmrepo subscriber | This fix is making sure the status update error won't override the addToTemplate error.
Without this incorrect overwrite, the helm subscriber logic would retry(after the sync-interval) when the cache channel is full.
Signed-off-by: ianzhang366 <ian.w.zhang@redhat.com> | diff --git a/pkg/subscriber/helmrepo/subscriber_item.go b/pkg/subscriber/helmrepo/helm_subscriber_item.go
similarity index 97%
rename from pkg/subscriber/helmrepo/subscriber_item.go
rename to pkg/subscriber/helmrepo/helm_subscriber_item.go
index 852890fa2..0f2945e13 100644
--- a/pkg/subscriber/helmrepo/subscriber_item.... | 5 | 3 | 1 | [{"id": "G0", "claim": "The reviewer questions whether setting `pkgMap[dplkey.Name] = true` at that spot is right and asks whether it could be placed somewhere more logically accurate.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The added 'error in se... | null |
stolostron__multicloud-operators-subscription__781 | stolostron/multicloud-operators-subscription | 781 | defect | 43f5608ef9777615d31446d69ba563dab856f473 | a65e4a80c3a5b684ab1417e76b361eb32afdb067 | update go to 1.18 | Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com>
https://github.com/stolostron/backlog/issues/23955 | diff --git a/.github/workflows/kind.yml b/.github/workflows/kind.yml
index e03d77bac..b043faef8 100644
--- a/.github/workflows/kind.yml
+++ b/.github/workflows/kind.yml
@@ -34,7 +34,7 @@ jobs:
- name: Set up go version
uses: actions/setup-go@v2
with:
- go-version: '^1.17' # The Go version to d... | 7 | 7 | 3 | [{"id": "G0", "claim": "pkg/controller/mcmhub/hub.go should keep the appv1 alias for apps/v1 and remove the appv1alpha1 alias, because appv1 is the current API version and the alpha one is no longer used.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl... | null |
stolostron__multicluster-observability-operator__1047 | stolostron/multicluster-observability-operator | 1,047 | defect | 910916dc2b7b9eb091f486c75075f8632a3a9572 | 13d33b0e28f54eb377d60f8404e00116c6ae5060 | expose grafana through grafana route | Signed-off-by: marcolan018 <llan@redhat.com>
https://github.com/stolostron/backlog/issues/23916 | diff --git a/operators/multiclusterobservability/config/rbac/mco_role.yaml b/operators/multiclusterobservability/config/rbac/mco_role.yaml
index c7c795fffa..ee8858a24e 100644
--- a/operators/multiclusterobservability/config/rbac/mco_role.yaml
+++ b/operators/multiclusterobservability/config/rbac/mco_role.yaml
@@ -349,3... | 1 | 1 | 0 | [{"id": "G0", "claim": "GrafanaOauthClientSecret is a hardcoded credential in config.go and may be a security risk.", "category": "security", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stolostron__multicluster-observability-operator__1146 | stolostron/multicluster-observability-operator | 1,146 | defect | c3e1e947854f3d711afaeccc814e0951a0158af6 | 5e15bb031c3e6a2e7802b0a1239fdb2a4eed4456 | Do not reconcile if annotation present | Signed-off-by: Nathaniel Graham <ngraham@redhat.com> | diff --git a/operators/multiclusterobservability/controllers/placementrule/placementrule_controller.go b/operators/multiclusterobservability/controllers/placementrule/placementrule_controller.go
index 65ff87aa5b..b9c092b9ce 100644
--- a/operators/multiclusterobservability/controllers/placementrule/placementrule_control... | 1 | 1 | 1 | [{"id": "G0", "claim": "The disable-addon-automatic-installation annotation should be checked on each of the ManagedCluster objects, not on the MCO custom resource in Reconcile.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
stolostron__multicluster-observability-operator__1401 | stolostron/multicluster-observability-operator | 1,401 | defect | 1cb5bad8ffedfe038cc5dbebee399f915241ccf3 | d7240d72884f3f1851ac3461aec3589fe9e9cc49 | [ACM-10865] fine-grain-rbac tech-preview | Forward port fine-rain-rbac dev-preview code into ACM 2.11. | diff --git a/go.mod b/go.mod
index cb06ae876d..3a0ec109a1 100644
--- a/go.mod
+++ b/go.mod
@@ -33,10 +33,11 @@ require (
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace
github.com/stolostron/multiclusterhub-operator v0.0.0-20220902185016-e81ccfbecf55
github.com/stolostron/observatorium-operator v0.0.0... | 14 | 10 | 0 | [{"id": "G0", "claim": "Avoid adding yet another global variable that can be nil (accessReviewer) in favor of a local variable that is passed around properly.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Avoid the named return in InitAccessReviewer bec... | null |
stolostron__multicluster-observability-operator__1427 | stolostron/multicluster-observability-operator | 1,427 | defect | a9fbe5f9432bcbea20ac553c7217f503246b76b8 | b8ace116a4c2f80bea77810953c300b23bb1baa4 | [ACM-10812]: retry status update on conflict | In some cases, while the metrics collector is well deployed in the spoke, the addon status remains in progressing state on the hub. After having modified the part that reflects the local observability addon state to the hub in https://github.com/stolostron/multicluster-observability-operator/pull/1420, this PR modifies... | diff --git a/operators/endpointmetrics/controllers/observabilityendpoint/observabilityaddon_controller.go b/operators/endpointmetrics/controllers/observabilityendpoint/observabilityaddon_controller.go
index dfd6b67185..7f3d1a4b56 100644
--- a/operators/endpointmetrics/controllers/observabilityendpoint/observabilityaddo... | 3 | 1 | 1 | [{"id": "G0", "claim": "The reviewer asks whether there is no ObservabilityAddon in the local cluster, questioning whether the newly guarded ReportStatus call can fetch and update one there.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new dedup... | null |
stolostron__multicluster-observability-operator__1805 | stolostron/multicluster-observability-operator | 1,805 | defect | d696091be04eb8aab20d84381cf114c334b015d4 | 9ce6a8b4cc9a5d72e82554869877d6657b08b7d4 | Fix e2e watchdog alert test | The watchdog alert is a Prometheus alert that is always on, and automatically deployed on openshift clusters with the in-cluster stack.
The e2e alert test, verifies that the watchdog alert is well forwarded to the hub alertmanager, validating the communication links. And as this alert is deployed everywhere, it is f... | diff --git a/tests/pkg/tests/observability_alert_test.go b/tests/pkg/tests/observability_alert_test.go
index 0d21d1aa1a..18e24e2886 100644
--- a/tests/pkg/tests/observability_alert_test.go
+++ b/tests/pkg/tests/observability_alert_test.go
@@ -302,6 +302,8 @@ var _ = Describe("Observability:", func() {
})
It("[P2]... | 3 | 2 | 0 | [{"id": "G0", "claim": "The generic ListManagedClusters may wrongly include the OCP/*ks clusters under its Available-condition check; the reviewer asks whether that condition should not apply to them and whether the function was fixed for the new local-cluster behavior, i.e. that the list functions be aligned.", "categ... | null |
stolostron__multicluster-observability-operator__1890 | stolostron/multicluster-observability-operator | 1,890 | defect | 6eca538b380165fe6ebff07e41c1625ee25e69a2 | 7121c397b6b580ab9b0972137a99458681c3814a | [ACM-15722] RBAC e2e only authorized user can query managed cluster metrics data | This PR includes the following changes
- Remove MCO v1beta1 related tests and changes. This should probably help run/start the tests quicker.
- Replace deprecated Ginkgo fns for all test files for after spec runs
- Add rbac testing to query metrics from users with different binding roles that limit access to quer... | diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index de34dcee92..7ac2b379d9 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -80,7 +80,6 @@ After running the tests, there will be some changes made to your environment.
We can clean up the environment by running:
```shell
-rm "examples/mco/e2e/v1beta1/observability.... | 3 | 1 | 1 | [{"id": "G0", "claim": "The kind e2e example keeps several component replicas above 1 instead of reducing them to 1, and the reviewer questions why they were not kept minimal.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new RBAC e2e test ignores the... | null |
stolostron__multicluster-observability-operator__2052 | stolostron/multicluster-observability-operator | 2,052 | defect | cd3db977a75aab5e3d18f96f8bfeee225c626c85 | 7ab1aa08dbf880f3320a7d0b70483770db239cae | MCO Annotation uwm-alert-forwarding to optionally disable UWM alert forwarding | Related to [ACM-21198](https://issues.redhat.com/browse/ACM-21198)
This PR supports a new MCO annotation to optionally disable UWM alert forwarding. This would be useful in environments where customers want to manage UWM config map externally and avoid potential conflicts.
```
oc annotate MultiClusterObservabil... | diff --git a/operators/endpointmetrics/controllers/observabilityendpoint/ocp_monitoring_config.go b/operators/endpointmetrics/controllers/observabilityendpoint/ocp_monitoring_config.go
index c296d998bd..ee49253718 100644
--- a/operators/endpointmetrics/controllers/observabilityendpoint/ocp_monitoring_config.go
+++ b/op... | 3 | 3 | 1 | [{"id": "G0", "claim": "IsUWMAlertingDisabledInSpec should return true rather than false when mco is nil, so the nil case matches the desired (alerting-disabled) state.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "Instead of passing the whole MCO ... | null |
stolostron__multicluster-observability-operator__2295 | stolostron/multicluster-observability-operator | 2,295 | defect | 41868a099b2d27bc615010e93b980a6e04b68663 | 7b9ac98d5a1f37bc57cbbc7f876cdda1b2f9c560 | Remove uiplugins from mcoa required crds | The uiplugins resource is not a configuration type needed by the ClusterManagementAddon.
It make the CI fail as the addon manager status is set as degraded because it's missing CRD. | diff --git a/operators/multiclusterobservability/manifests/base/multicluster-observability-addon/cluster_management_addon.yaml b/operators/multiclusterobservability/manifests/base/multicluster-observability-addon/cluster_management_addon.yaml
index 8eef9f77cd..22ac71c0d8 100644
--- a/operators/multiclusterobservability... | 1 | 1 | 1 | [{"id": "G0", "claim": "Asks whether UI is planned to be enabled by default when metrics collection is enabled, questioning whether the removal drops the platformMetricsUI custom var that used to be appended when cs.Platform.Metrics.UI.Enabled.", "category": "correctness", "verdict": "supported", "priority": "P1", "sco... | null |
stolostron__multicluster-observability-operator__2378 | stolostron/multicluster-observability-operator | 2,378 | defect | d7d2da18b1cda105daa91124fd7bf4a91facc9a6 | ee1757985327af5452afaf1970c61f618fe48c8c | feat(metrics): add clustercheck validation tool | Introduce a developer debug tool to ensure scrapeConfigs' metrics availability across managed clusters.
Output example:
```bash
Cluster: local-cluster (58/84 metrics present)
Missing:
- accelerator_card_info
- acm_label_names
- active_streams_lease:grpc_server_handled_total:sum
- active_strea... | diff --git a/cicd-scripts/metrics/README.md b/cicd-scripts/metrics/README.md
index e379abcd76..9d7ff93c50 100644
--- a/cicd-scripts/metrics/README.md
+++ b/cicd-scripts/metrics/README.md
@@ -1,6 +1,6 @@
-# Metrics CI tools
+# Metrics tools
-Collection of simple CI tools and scripts to validate the list of metrics col... | 6 | 3 | 1 | [{"id": "G0", "claim": "Add test cases where the Prometheus query returns an error (exercising the mockErr field) for getManagedClusters and fetchMetricAvailability to cover the error-handling path.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Sorting... | null |
stolostron__multicluster-observability-operator__2404 | stolostron/multicluster-observability-operator | 2,404 | defect | 62cb738bed93ac53352b32387cdaae9bdef66de5 | 1992c81615266b66f7429b57e9b00587602e9c31 | [ACM-32844] Add right-sizing delegation from MCO to MCOA via MCO CR annotation | ## Summary
Adds a migration path for right-sizing (RS) recommendations from MCO's
Policy-based approach to MCOA's ManifestWork... | diff --git a/operators/multiclusterobservability/controllers/analytics/analytics_controller.go b/operators/multiclusterobservability/controllers/analytics/analytics_controller.go
index 5650061a34..9a20f9dc08 100644
--- a/operators/multiclusterobservability/controllers/analytics/analytics_controller.go
+++ b/operators/m... | 12 | 6 | 4 | [{"id": "G0", "claim": "The in-memory wasDelegated flag does not survive pod restarts, so the first reconcile in MCOA mode may re-run CleanupPolicyResourcesForDelegation even if cleanup already happened; persist the state or add a quick \"are Policy resources present?\" check to skip cleanup when already clean.", "cate... | null |
stolostron__multicluster-observability-operator__2444 | stolostron/multicluster-observability-operator | 2,444 | defect | b3fa6f206d2f2b6ca92d65ef6ea1b1548f392b12 | 8834b39286ce9b78661ed849e908ccc4d6de14eb | fix(deployer): eliminate infinite reconciliation loops caused by semantic equality failures | ### What this PR does / why we need it:
This PR resolves a set of infinite reconciliation loops in the `Deployer` component that were silently consuming operator CPU and generating excessive API server traffic. The loops were caused by subtle failures in `equality.Semantic.DeepDerivative` across two distinct resourc... | diff --git a/operators/multiclusterobservability/controllers/multiclusterobservability/predicate_func.go b/operators/multiclusterobservability/controllers/multiclusterobservability/predicate_func.go
index 52243a488b..3aee4363f9 100644
--- a/operators/multiclusterobservability/controllers/multiclusterobservability/predi... | 7 | 7 | 4 | [{"id": "G0", "claim": "updateSecret issues the Update without copying the runtime ResourceVersion onto desiredSecret, which the API server requires on PUT, unlike the pattern used in updateService.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A m... | null |
stolostron__multicluster-observability-operator__2471 | stolostron/multicluster-observability-operator | 2,471 | defect | 228c2acab044856eb48aa70b8457d96eba852022 | 96bc66c5088a0c6669782d22f6237bc4adba9990 | fix(rightsizing): add ADC delegation signal for MCO/MCOA mode disambiguation | ## Summary
- Adds `rightSizingDelegated` key to AddOnDeploymentConfig (ADC) so MCOA can distinguish "MCO handles right-sizing" from "feature genuinely disabled in MCOA mode"
- Analytics controller syncs this key alongside existing namespace/virtualization keys
- Renderer seeds the key during initial ADC creation
... | diff --git a/operators/multiclusterobservability/controllers/analytics/analytics_controller.go b/operators/multiclusterobservability/controllers/analytics/analytics_controller.go
index 7ff1115018..b0f18f54e3 100644
--- a/operators/multiclusterobservability/controllers/analytics/analytics_controller.go
+++ b/operators/m... | 2 | 2 | 1 | [{"id": "G0", "claim": "In MCO mode the disabled-state log line should also record the namespace and virtualization values, not just delegated, so state transitions are fully auditable.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The controll... | null |
stolostron__multicluster-observability-operator__730 | stolostron/multicluster-observability-operator | 730 | defect | 68647824d3944aa1a45ab8ef690f72db74f0d209 | c798cf6d35ab821b008372ffada277d6fe263aa2 | run mco e2e in KinD via Prow | https://github.com/open-cluster-management/backlog/issues/15085
Signed-off-by: Song Song Li <ssli@redhat.com> | diff --git a/cicd-scripts/customize-mco.sh b/cicd-scripts/customize-mco.sh
index d5882df3fb..a580cf8524 100755
--- a/cicd-scripts/customize-mco.sh
+++ b/cicd-scripts/customize-mco.sh
@@ -3,10 +3,14 @@
# Copyright (c) 2021 Red Hat, Inc.
# Copyright Contributors to the Open Cluster Management project
-set -e
+set -ex... | 2 | 2 | 1 | [{"id": "G0", "claim": "Please remove the status and other unused fields from tests/run-in-kind/req_crds/clusteroperators-crd.yaml.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Move the IS_KIND_ENV kustomize edit set image block out of customi... | null |
stolostron__multicluster-observability-operator__863 | stolostron/multicluster-observability-operator | 863 | defect | 033dc965225fdcb42fa5f8b9576ab02f2ea83d35 | 0adc621277dd35e1c471709ebc8473a566c2a59d | fix ocp311 cluster overview dashboard. | ref: open-cluster-management/backlog#13360 and https://github.com/stolostron/backlog/issues/19120
Signed-off-by: morvencao <lcao@redhat.com> | diff --git a/operators/multiclusterobservability/controllers/placementrule/manifestwork.go b/operators/multiclusterobservability/controllers/placementrule/manifestwork.go
index 0bff6f960a..66b33a423b 100644
--- a/operators/multiclusterobservability/controllers/placementrule/manifestwork.go
+++ b/operators/multiclustero... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request should not differentiate the custom metrics allowlist by OCP version; the custom allowlist should apply to all (OCP 3 and OCP 4) instead of requiring users to maintain a separate OCP 3.11 custom metrics list.", "category": "design", "verdict": "supported", "priority": "P1", "sco... | null |
ston-fi__ton-rs__155 | ston-fi/ton-rs | 155 | defect | aa49bb9f0a5beafbda8e916894e2d8d68b15946e | a47284b4330676688ff7f01deec6fe42c3fc6f02 | Improvements to ton_contract! macro | Adding TVMResult impl for Coins, support of data type for ton_contract! macro, improvements for emulate_get_method() and get_parsed_data, fixing clippy complaints | diff --git a/benchmarks/benchmark_utils.rs b/benchmarks/benchmark_utils.rs
index 4b067b15..ae9a79e4 100644
--- a/benchmarks/benchmark_utils.rs
+++ b/benchmarks/benchmark_utils.rs
@@ -20,6 +20,7 @@ pub fn get_now_ns() -> u128 { SystemTime::now().duration_since(UNIX_EPOCH).unwra
const FIBONACHI_TASK_LOAD: u64 = 13; //... | 4 | 4 | 2 | [{"id": "G0", "claim": "The example no longer needs its own get_pool_data method since get_parsed_data() can be called directly, and best practice should be left in the example.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The value returned by emulate... | null |
stoneatom__stonedb__105 | stoneatom/stonedb | 105 | defect | 411b19dcda2adb2e262413e78b6e89135d18dc4a | 5c93857b7533de7d5ee4abac2d7f9c47ff544c91 | feat(stonedb): Header file format standardization (#36) | <!--
Thank you for contributing to StoneDB!
PR Title Format: <type>(<scope>): description to this pr (#issue_id)
e.g.
fix(util): fix sth..... (#1)
-->
## Summary about this PR
<!--
There MUST be one line starting with "Issue Number: " and
linking the relevant issues via the "close" or "ref".
e.g.:... | diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 042d9e5da3..d2ac0124af 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3053,11 +3053,11 @@ case SQLCOM_PREPARE:
and item_list belong to SELECT
*/
// StoneDB hook added
- int bh_res, free_join_from_bh, optimize_af... | 15 | 11 | 0 | [{"id": "G0", "claim": "The changed code in sql/sql_parse.cc should be formatted with clang-format.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In base/core/future.h the include \"base/util/gcc6-concepts.h\" should be placed after \"base/core/t... | null |
stoplightio__prism__1035 | stoplightio/prism | 1,035 | defect | ab2a89984ce9a5ca00f83aa9786c3806f5d72464 | b44e8309973be5c3bf33f302904b97c1ee0e851d | feat: add custom error for 2** | Create a specific error for Prism when it cannot find a suitable 2XX response so we can differentiate with something that's not under our control | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 965b248fd..f214de19c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## Fixed
- Prism is now able to correctly differentiate between a preflight request and a regular `OPTIONS... | 3 | 3 | 1 | [{"id": "G0", "claim": "The change from Object.assign to lodash merge for opts.config.mock in packages/http-server/src/server.ts is unexplained and has no corresponding test.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new error's title 'No 2** r... | null |
stoplightio__prism__1159 | stoplightio/prism | 1,159 | defect | 15db66ae05fa0a00fe6579a7b6e48ab694c1819d | bb708f859f095ce4104d9cf7e797c85ead3ec4c5 | Compare content type parameters separately | This pull request implements a backup strategy to ignore parameters in content type when is possible. Since they're not standard (apart for the `q` value) we won't assume anything about it and drop them in some cases
Closes #1152 | diff --git a/package.json b/package.json
index 736d2a974..dd563d333 100644
--- a/package.json
+++ b/package.json
@@ -26,6 +26,7 @@
"@stoplight/types": "^11.4.1",
"@types/caseless": "^0.12.2",
"@types/chance": "^1.0.6",
+ "@types/content-type": "^1.1.3",
"@types/faker": "^4.1.5",
"@types/jest... | 3 | 3 | 0 | [{"id": "G0", "claim": "Refactor the `if (mediaTypes && isNonEmpty(mediaTypes))` branch into an fp-ts pipe with `O.fromNullable`, `O.chain` and `O.fold`, if that would be considered.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Replace `O.map(... | null |
stoplightio__prism__1433 | stoplightio/prism | 1,433 | defect | 47590676a7e5d6abbc4279316f4c19db27594f5e | eacfdffc66631bc7c72e2e0fb5fe2d7a7cbd89bf | Break the validator apart | …followup #1430 for #1135
Better review with no whitespaces: https://github.com/stoplightio/prism/pull/1433/files?w=1
🎉 Note: when this is merged, Prism will be 🥳 _class-free_ 🥳 🎉 (apart from the ProblemJSON error, but that's inevitable as fas as I know) | diff --git a/packages/cli/src/util/runner.ts b/packages/cli/src/util/runner.ts
index f901d67ee..35d6a810b 100644
--- a/packages/cli/src/util/runner.ts
+++ b/packages/cli/src/util/runner.ts
@@ -1,4 +1,4 @@
-import { IPrismHttpServer } from '@stoplight/prism-http-server/src/types';
+import type { IPrismHttpServer } from ... | 2 | 1 | 0 | [{"id": "G0", "claim": "The consolidated export line at the bottom of packages/http/src/validator/index.ts is unnecessary; symbols should be exported directly in place where they are defined, per the team's usual convention.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced... | null |
stoplightio__prism__1873 | stoplightio/prism | 1,873 | defect | 0a76691afe931df3728db7fb9709573a2ad8ce6c | ed5bce837fb0cf83d15fb1a085227986f063aee7 | fix: decode path before matching it | **Summary**
You have a spec with `/some path` in it and you're trying to mock this path with mocker. If you'll send an encoded path (`/some%20path`) to the mocker it wont be able to find a corresponding path in the spec at will throw `NO_PATH_MATCHED_ERROR` which is not correct.
**Checklist**
- The basics
-... | diff --git a/packages/http/src/router/__tests__/index.spec.ts b/packages/http/src/router/__tests__/index.spec.ts
index 7c86f70be..8dc1b096f 100644
--- a/packages/http/src/router/__tests__/index.spec.ts
+++ b/packages/http/src/router/__tests__/index.spec.ts
@@ -477,6 +477,31 @@ describe('http router', () => {
... | 2 | 1 | 0 | [{"id": "G0", "claim": "The reviewer questions when decodeURIComponent can actually throw an error, probing whether the try/catch guard around it is needed at all.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "matchPath lacks a functional approach and g... | null |
stoplightio__prism__2041 | stoplightio/prism | 2,041 | defect | 9c5b4e447307ca7c4b00a2a7a9f5e46c83702501 | e2da12138d330627d1a8b67c581a71310bc4163b | Added alphabetical ordering to generated objects | Ordering by the original JSON schema would be optimal but this seems better than random?
Addresses #2038
**Summary**
Json parameters are returned in (random?) order from dynamic mocking. Ugly at best, hard to find what you are looking for.
**Checklist**
- The basics
- [X] I tested these changes manu... | diff --git a/packages/http/src/mocker/generator/JSONSchema.ts b/packages/http/src/mocker/generator/JSONSchema.ts
index 208193499..630a07dba 100644
--- a/packages/http/src/mocker/generator/JSONSchema.ts
+++ b/packages/http/src/mocker/generator/JSONSchema.ts
@@ -1,5 +1,5 @@
import * as faker from 'faker';
-import { clon... | 3 | 3 | 2 | [{"id": "G0", "claim": "The unused imports (JSONSchema7Type, right, sort, isFalsy) and the commented-out import added at the top of JSONSchema.ts should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "sortSchemaAlphabetically should g... | null |
stoplightio__prism__2103 | stoplightio/prism | 2,103 | defect | 58ac454ed31bfe2fd21cca2888bd2b478a80c33c | a8c787f893109a966b290d3ab2c8fe909fdfa5b2 | fix(http-server): discard request body if the content-length header i… | Addresses #2102
**Summary**
This PR changes the condition of the HTTP server resolving the request body. It assumes that the body is null in case of an explicit `Content-Length: 0`.
Since in #1990 the decision was made to assume no body in case of no explicit `Content-Length` other than zero (omitting will ass... | diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 000000000..b6a7d89c6
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+16
diff --git a/packages/http-server/src/__tests__/body-params-validation.spec.ts b/packages/http-server/src/__tests__/body-params-validation.spec.ts
index d48d04021..f2be5c228 100644
--- a/packages/ht... | 2 | 1 | 1 | [{"id": "G0", "claim": "The test should be updated to send a body that has some but not all required properties, so that it still tests that a missing required property in the body throws an error rather than testing that a completely missing body throws an error.", "category": "testing", "verdict": "supported", "prior... | null |
stoplightio__prism__2408 | stoplightio/prism | 2,408 | defect | a61f75f75db055e01b3bdefc4de5c18a4449b7de | e243e1e796560f8df98cc75c3a710f7ceff72c94 | Implement --ignoreExamples CLI flag for Prism to treat spec as though it doesn't have examples | Addresses comments on PR #2383
**Summary**
This PR introduces a new CLI flag --ignoreExamples. When present, and in static mode, the flag tells Prism to treat the spec as if it doesn't have any response examples defined. In this case, Prism continues to do what it already does in static mode when no response exampl... | diff --git a/docs/guides/01-mocking.md b/docs/guides/01-mocking.md
index b024c82ac..a1b5f51ca 100644
--- a/docs/guides/01-mocking.md
+++ b/docs/guides/01-mocking.md
@@ -203,6 +203,8 @@ When you call `curl http://127.0.0.1:4010/pets/123`, the operation references th
Notice that `name` had an `example` with a value so... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new documentation paragraph should put `--ignoreExamples` in backticks wherever the command-line flag is mentioned.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stoplightio__prism__278 | stoplightio/prism | 278 | defect | 01eecdd30601f5df0bc9bd5ff57f743ad8ff09c2 | 9486d96ff35c43df3c6808caeaf56821a080c00e | fix: look for 422 for invalid requests | This PR will make sure Prims will look for `422` responses in the document for invalid requests first; if not defined, Prism will generate one and not use the `default` response, if defined.
This replace the following behaviour: look for `400` response and if not defined, use the `default` response and, if not defin... | diff --git a/README.md b/README.md
index 3966b953e..ccea0185d 100644
--- a/README.md
+++ b/README.md
@@ -75,7 +75,7 @@ Prism can be forced to return different HTTP responses by specifying the status
string:
```bash
-curl http://127.0.0.1:4010/pets/123?__code=404
+curl -v http://127.0.0.1:4010/pets/123?__code=404
... | 1 | 1 | 1 | [{"id": "G0", "claim": "On validation failure the negotiator should look for a 422 response and, failing that, fall back to a 400 response before using a default, instead of only looking for a 422 response.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
stoplightio__prism__344 | stoplightio/prism | 344 | defect | d798eb25f3796442a63bff45532307762c9090f3 | 074bf4d29e54b7b48004ec6b411ab6177e820a67 | fix: add generic */*+json parser | 1. Restores default Fastify serialisation for regular JSON
2. Uses `type-is.is` to detect a flavour of JSON and parse/serialise it
3. Removes an old negotiation test that does not really make that much sense and it's already tested inside there
Closes #341 | diff --git a/package.json b/package.json
index b9faa3e27..8331a4bac 100644
--- a/package.json
+++ b/package.json
@@ -43,6 +43,7 @@
"@types/lodash": "^4.14.132",
"@types/node": "^12.0.2",
"@types/signale": "^1.2.1",
+ "@types/type-is": "^1.6.2",
"chance": "^1.0.18",
"globby": "^9.2.0",
"... | 4 | 4 | 3 | [{"id": "G0", "claim": "The typeIs check ['application/*+json'] is too strict and will not match plain application/json; the reviewer suggests typeIs(req, ['json']) instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The serializer regex /applic... | null |
stoplightio__prism__384 | stoplightio/prism | 384 | defect | e57c86c210a3f89db1fbc2789dfe1976cd1a0181 | 101121acb5d86bcd029c159475cff901d4a3e7f1 | feat(faker): extend json-schema-faker to enable faker support | ## Checklist
- [x] Tests have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
## What kind of change does this PR introduce?
_feature_
This PR originated from the discussion [here](https://community.stoplight.io/t/prism-dynamic-mocks-with-faker-js/717).... | diff --git a/examples/petstore.oas3.json b/examples/petstore.oas3.json
index bd5cc663e..34a9566c3 100644
--- a/examples/petstore.oas3.json
+++ b/examples/petstore.oas3.json
@@ -1260,7 +1260,8 @@
},
"name": {
"type": "string",
- "example": "doggie"
+ "example": "d... | 6 | 5 | 0 | [{"id": "G0", "claim": "The new faker extension in the JSON Schema generator should be covered by a unit test.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The x-faker line added to the petstore example file should be dropped and the example file left... | null |
stoplightio__prism__450 | stoplightio/prism | 450 | defect | 2271f1dd50698c233951ac5929a7c4f8243380a5 | 62efb4d201e7e38b199c33b17943e6f00f1af05c | fix: respect the required parameter in the body | Closes #419
Requires #446 | diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 91706489f..6f34359c4 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -28,8 +28,9 @@ jobs:
- script: npx pkg --output ./cli-binaries/prism-cli ./packages/cli/
displayName: Create binary
- - script: yarn test.harness
+ ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new required true/false tests duplicate the setup copied from the test() helper, so they confirm the difference between the helper and the copy rather than between the behaviours, and should instead pass in arguments for the request object or use a less hidden approach.", "category": "testin... | null |
stoplightio__prism__480 | stoplightio/prism | 480 | defect | 9d10471e3cc3f78b00056332c553ea7a8909888a | 551e5327d7c847e642a14dfe9d3862790635253d | test: add examples for manual example selection | Add failing examples for #411
Successful ones are in https://github.com/stoplightio/prism/pull/481
Closes #411 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3bd9f7e15..b1e616463 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,8 +10,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Prism is now returning a `406` error instead of an empty response in case it is not able to find a resp... | 2 | 2 | 2 | [{"id": "G0", "claim": "Two harness tests encode mutually exclusive expectations for requesting a non-existent default example (404 versus the first example), so the product behaviour has to be settled.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "If ... | null |
stoplightio__prism__485 | stoplightio/prism | 485 | defect | 63d1f87cd9d0b7ad95a76df23ba53553c475d1a1 | 76cff6174cff7d5927909c795c1dcbdd3d8b232d | feat: add prism user-agent header for http requests made with http client | ## Checklist
- [x] Tests have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
## What kind of change does this PR introduce?
Feature.
## What is the current behavior? What is the new behavior?
Currently, when a HTTP request is made with HTTP Client, ... | diff --git a/packages/http/README.md b/packages/http/README.md
index 105606ec4..995ae2b65 100644
--- a/packages/http/README.md
+++ b/packages/http/README.md
@@ -237,6 +237,7 @@ const config = {
```
With the above configuration the http client will proxy your requests to a server and will validate the response with ... | 6 | 6 | 1 | [{"id": "G0", "claim": "Remove the README sentence saying proxied requests have a 'user-agent' header set to Prism/<<PRISM_VERSION>>, since it adds no value for consumers.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Import version from package.... | null |
stoplightio__prism__545 | stoplightio/prism | 545 | defect | 5edcbca38249f4139410d3f442904df034e913d7 | d1441c618f698a790a37b84c1b0db56d1d60c8a2 | docs: add errors page | Closes #527
I've added all the know errors with a brief explanation. For some of these, I've also provided an example on how such error could occur. | diff --git a/docs/guides/errors.md b/docs/guides/errors.md
new file mode 100644
index 000000000..bb8b1a3ef
--- /dev/null
+++ b/docs/guides/errors.md
@@ -0,0 +1,156 @@
+# Errors
+
+All the errors that Prism returns conform to the [RFC7807](https://tools.ietf.org/html/rfc7807). In a nutshell, this means that you'll alway... | 12 | 11 | 0 | [{"id": "G0", "claim": "The word `informations` in the errors guide should be the singular `information`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The heading sentence should read `This class of errors is returned` instead of `This class of ... | null |
stoplightio__prism__546 | stoplightio/prism | 546 | defect | 5edcbca38249f4139410d3f442904df034e913d7 | 922c33d1d4d29a71402288deb7c6363ec1c91072 | Handle `and relation` between security schemes | ## Checklist
- [x] Tests have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
## What kind of change does this PR introduce?
Feature.
## What is the current behavior? What is the new behavior?
Currently, `and relation` between schemes is not respecte... | diff --git a/package.json b/package.json
index f4445e6ad..573205d9f 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"test.harness": "jest -c ./jest.harness.config.js"
},
"devDependencies": {
- "@stoplight/types": "^9.1.2",
+ "@stoplight/types": "^11.0.0",
"@types/caseless": "^0.12.2... | 5 | 3 | 0 | [{"id": "G0", "claim": "The reviewer asks the author to also add a test covering the OR relation between security schemes, alongside the new AND tests.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The gatherInvalidResults parameter named firstLeft has... | null |
stoplightio__prism__661 | stoplightio/prism | 661 | defect | ce3fc9917486b9ef55ebcdb54cc2d486eebd938d | bf31e54e75dc3c3f964e0f48e687d466ddb0ca10 | fix: do not return uuids in urn format | ## Checklist
- [x] Tests have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
## What kind of change does this PR introduce?
_Bug fix_
## What is the current behavior? What is the new behavior?
```yaml
type: string
format: uuid
```
never returns ... | diff --git a/packages/http/src/mocker/generator/JSONSchema.ts b/packages/http/src/mocker/generator/JSONSchema.ts
index d049cfcb6..c1629bae9 100644
--- a/packages/http/src/mocker/generator/JSONSchema.ts
+++ b/packages/http/src/mocker/generator/JSONSchema.ts
@@ -20,8 +20,15 @@ jsf.option({
maxLength: 100,
});
+// T... | 3 | 2 | 1 | [{"id": "G0", "claim": "The generator should handle uuids nested inside objects (recursively), not just top-level string uuid values.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The uuidRegExp in the tests should be anchored with ^ so the test ve... | null |
stoplightio__prism__689 | stoplightio/prism | 689 | defect | de96a4f2434ee0ce92cb5b088729fa5ef4a2b040 | 147fa1b35a1d63fd2fca71075ca6fd9f69dbaf36 | feat: auto reload a Prism instance when the doc changes | ## Checklist
- [ ] Tests have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
## What kind of change does this PR introduce?
_feature_
## What is the current behavior? What is the new behavior?
HTTP server that Prism uses is now shut down and restart... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef5fc99af..4833329cd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Validating output status code against available response specs [#648](https://github.com/stoplightio/pris... | 7 | 7 | 2 | [{"id": "G0", "claim": "The auto-reloading docs should also make explicit what happens when the target document modified on disk is incorrect.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Keep the original `const _v = yargs` form instead of the ... | null |
stoplightio__prism__927 | stoplightio/prism | 927 | defect | 3cab193c6d32d77d0d1694aa2d1bacd2d67d0106 | 96eb7230037a8c3915d14aa4cd7e989a79521953 | Using Micri HTTP server | Closes #790
## Checklist
- [x] Tests have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
## What kind of change does this PR introduce?
Refactor
## What is the current behavior? What is the new behavior?
This PR replaces fastify HTTP server with... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a69a4dbf2..6d4a819e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
# Unreleased
+## Changed
+
+- Replaced Fastify HTTP server with its tinier counterpart: Micri [#927](htt... | 19 | 16 | 1 | [{"id": "G0", "claim": "The node-fetch dependency added in the http-server package belongs in devDependencies of the main package.json file.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tests should not expose the HTTP framework's guts (se... | null |
stoplightio__prism__961 | stoplightio/prism | 961 | defect | 584ced635c8bed8819e393a61c80f61ca940cff5 | 41f59b5196cd0f294807cbdcad2524887739cfea | Make matchBaseUrl exception-safe | Closes #960 | diff --git a/packages/http/src/router/__tests__/matchBaseUrl.spec.ts b/packages/http/src/router/__tests__/matchBaseUrl.spec.ts
index c943ab41f..1b90965f8 100644
--- a/packages/http/src/router/__tests__/matchBaseUrl.spec.ts
+++ b/packages/http/src/router/__tests__/matchBaseUrl.spec.ts
@@ -1,5 +1,6 @@
import { convertTe... | 14 | 14 | 2 | [{"id": "G0", "claim": "matchBaseUrl should declare its return type explicitly as E.Either<Error, MatchType> instead of leaving it inferred.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "matchBaseUrl should not fold the Either and rethrow the e... | null |
stoplightio__prism__984 | stoplightio/prism | 984 | defect | 34460dd8d4fa0a1cf6922866c542b4d40603c43a | 3eb476019c2a119169287ae635fa755ba8b14bcb | Prefer header | * Replace our homemade query string validation with an appropriate io-ts decoder
* Converting the process of decoding in an Either, pushing it in the pipe list we already have
* Modify the tests
* Implement options lookup in headers, fallback to query for compatibility
Closes #966
| diff --git a/packages/http-server/package.json b/packages/http-server/package.json
index acbb4b96a..f2b667a6f 100644
--- a/packages/http-server/package.json
+++ b/packages/http-server/package.json
@@ -23,6 +23,8 @@
"@stoplight/prism-http": "^3.2.8",
"fast-xml-parser": "^3.12.20",
"fp-ts": "^2.1.1",
+ ... | 2 | 1 | 0 | [{"id": "G1", "claim": "The PR author and maintainer should decide whether the Prefer header fully overrides query parameters or a mixture is supported, and Prism should strip its own preferences from incoming Prefer headers before further processing to avoid interfering with headers users may already define (e.g. rege... | null |
stoplightio__spectral__1020 | stoplightio/spectral | 1,020 | defect | e301d20bed1e00126baf3a0f39341fa88607d436 | 236a9a3674d7337457989a93cb5e29b5cf46215e | fix(exceptions): avoid swallowing results | Fix #1018
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
/cc @m-mohr | diff --git a/docs/getting-started/rulesets.md b/docs/getting-started/rulesets.md
index cf1177e9e7..b31ffea9ba 100644
--- a/docs/getting-started/rulesets.md
+++ b/docs/getting-started/rulesets.md
@@ -256,7 +256,7 @@ the rule entirely. This may happen, for instance, when working with legacy APIs.
The ruleset can be ex... | 7 | 7 | 2 | [{"id": "G0", "claim": "The note about using `-f json`/`--format json` to find exception paths, and an explanation that the location path must precisely match, should be added to the docs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The sente... | null |
stoplightio__spectral__1078 | stoplightio/spectral | 1,078 | defect | ec6b829a8bfa047882b9939738c6f95eb180c5aa | 4e77e183ccb22935fbbbe71a277b9fa739e9ff07 | feat: expose cache to custom functions |
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Additional context**
I hope I got the documentation right :sweat_smile: | diff --git a/docs/guides/custom-functions.md b/docs/guides/custom-functions.md
index a46d1deea..1c1d4d339 100644
--- a/docs/guides/custom-functions.md
+++ b/docs/guides/custom-functions.md
@@ -233,6 +233,18 @@ module.exports = (targetVal, _opts, paths) => {
};
```
+Furthermore, if your function performs any fs call... | 3 | 3 | 1 | [{"id": "G0", "claim": "The documentation explains that users may want to leverage the cache but gives no information on how to do so; please add a simple sample.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The statement that for a CLI user the... | null |
stoplightio__spectral__1094 | stoplightio/spectral | 1,094 | defect | 3bc1eae1c0e8431fbc18091d253810c259f2147a | e1c80e41444542ca7fdac3ff4b28d0bccbd6e3f7 | fix: ensure all rules are recommended by default | As of Spectral 5, all rules are recommended by default now. However, no normalization is applied to the `recommended` property (as it's done for `severity`, for instance). This PR fixes this.
Also slightly enhance the code coverage to ensure the `recommended` setting of a rule eventually leads to the rule being run ... | diff --git a/src/__tests__/spectral.jest.test.ts b/src/__tests__/spectral.jest.test.ts
index 91250d5309..6cb2ab2d71 100644
--- a/src/__tests__/spectral.jest.test.ts
+++ b/src/__tests__/spectral.jest.test.ts
@@ -32,6 +32,7 @@ describe('Spectral', () => {
name,
...rule,
format... | 4 | 2 | 1 | [{"id": "G0", "claim": "The added normalization of `recommended` in normalizeRule is not needed because a check for that already exists elsewhere in rules.ts (line 121).", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer questions what th... | null |
stoplightio__spectral__1135 | stoplightio/spectral | 1,135 | defect | e798cab7b80e44a115c11138be498394db6885bb | 8bea4179d81c12b09e9062fd6225421a9d5a58d6 | fix(oas): path-params reports actual endpoint path | Fixes https://github.com/stoplightio/spectral/issues/1130
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Additional context**
Make sure to answer my question before reviewing :sweat_smile:
https://github.com... | diff --git a/src/rulesets/oas/functions/__tests__/oasOp2xxResponse.test.ts b/src/rulesets/oas/functions/__tests__/oasOp2xxResponse.test.ts
index 1523672a8..232fda4a1 100644
--- a/src/rulesets/oas/functions/__tests__/oasOp2xxResponse.test.ts
+++ b/src/rulesets/oas/functions/__tests__/oasOp2xxResponse.test.ts
@@ -4,13 +4... | 1 | 1 | 0 | [{"id": "G0", "claim": "In the 'Error if paths are functionally equivalent' test, the expected end range is identical for ['paths'] and ['paths', '/foo/{bar}'] — the range is imprecise because the document is passed as an object literal that gets stringified, so the test should pass a string/document instead.", "catego... | null |
stoplightio__spectral__1169 | stoplightio/spectral | 1,169 | defect | 05d029c6920fbba1d883904c4da6ec20e5028d3c | 19ed154d33c7c11bef373b6dbdeaf4b5e1c74cb5 | feat: custom functions lifecycle events | Closes #1168
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/docs/guides/5-custom-functions.md b/docs/guides/5-custom-functions.md
index ea29b2b0b..b71ebdf80 100644
--- a/docs/guides/5-custom-functions.md
+++ b/docs/guides/5-custom-functions.md
@@ -56,6 +56,46 @@ export type IFunction<O = any> = (
) => void | IFunctionResult[];
```
+### Validating options
+
+If ... | 5 | 3 | 0 | [{"id": "G0", "claim": "Instead of the complicated lifecycle, the PR could provide a batch interface for custom functions, which seems much easier for users to write and avoids the memory-leak potential.", "category": "design", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The... | null |
stoplightio__spectral__1214 | stoplightio/spectral | 1,214 | defect | bdf9660a3fe2c260ba91f74ef4fee7cbf1a48eaf | 969686463b7fcdd0bb206eb20447729c9f13a58f | fix: do not attempt to resolve primitive values | Fixes https://github.com/stoplightio/spectral/issues/1209
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/src/__tests__/linter.test.ts b/src/__tests__/linter.test.ts
index 4d213bde25..ecfcc6bd29 100644
--- a/src/__tests__/linter.test.ts
+++ b/src/__tests__/linter.test.ts
@@ -6,6 +6,8 @@ import { IParsedResult } from '../document';
import { isOpenApiv2, isOpenApiv3 } from '../formats';
import { mergeRules, re... | 3 | 1 | 0 | [{"id": "G0", "claim": "The new `!isObjectLike(this.document.data)` guard would return true for an array (isObjectLike is true for arrays), so array documents would proceed to resolution — nulltoken asks whether that is something the PR should guard against.", "category": "design", "verdict": "opposed", "priority": "P3... | null |
stoplightio__spectral__1227 | stoplightio/spectral | 1,227 | defect | 40a39628cd2cb9e907d5e052d9d186838c70659e | 049033016b8788babd79880f952c8d24a2b09de0 | fix: check against valid operations before checking parameters exist. | Fixes #1187.
**Checklist**
- [X] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
> If indicated yes above, please describe the breaking change(s).
>
> **Remove this quote before creating the PR.**
**Screenshots**
If applicable, a... | diff --git a/src/rulesets/oas/functions/__tests__/oasPathParam.test.ts b/src/rulesets/oas/functions/__tests__/oasPathParam.test.ts
index 53261b101..226d45245 100644
--- a/src/rulesets/oas/functions/__tests__/oasPathParam.test.ts
+++ b/src/rulesets/oas/functions/__tests__/oasPathParam.test.ts
@@ -121,6 +121,18 @@ descri... | 1 | 1 | 0 | [{"id": "G0", "claim": "Update the `path-params` section of the `openapi-rules.md` documentation to quickly explain that very non-standard HTTP operations will be silently ignored.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stoplightio__spectral__1234 | stoplightio/spectral | 1,234 | defect | 40a39628cd2cb9e907d5e052d9d186838c70659e | 33ca7e3e179e86e632c67a389237dc98e9e251cf | feat: support proxies via JS | Fixes #1081.
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Additional context**
This fixes #1081 (after a long delay -- my bad) by allowing a proxy to be passed to the `Spectral` constructor. It allows remote $... | diff --git a/docs/guides/3-javascript.md b/docs/guides/3-javascript.md
index defcb437e..7264aa370 100644
--- a/docs/guides/3-javascript.md
+++ b/docs/guides/3-javascript.md
@@ -192,6 +192,19 @@ spectral
});
```
+### Using a proxy
+
+Spectral supports http(s) proxies when fetching remote schemas and rulesets.
+
+`... | 1 | 1 | 1 | [{"id": "G0", "claim": "Mutating the global DEFAULT_REQUEST_OPTIONS with a ProxyAgent means there cannot be more than a single Spectral instance (one proxied, one not), so add a createHttpAndFileResolver fn in src/resolvers/http-and-file.ts that takes custom request options and pass the whole agent there so the proxy a... | null |
stoplightio__spectral__1306 | stoplightio/spectral | 1,306 | defect | c9d2714f8dd877a8b64e985b31266f9e7d951f79 | 2b8221eb60d3ebafac3e566b887465604622719c | chore: make readfile/readParsable unaware of file descriptors | **Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [x] Yes
- [ ] No
Handling file descriptors is a CLI only concern. This change makes
those two core functions unlearn how to deal with them. | diff --git a/src/cli/services/linter/linter.ts b/src/cli/services/linter/linter.ts
index f538cbe7bf..79f7725297 100644
--- a/src/cli/services/linter/linter.ts
+++ b/src/cli/services/linter/linter.ts
@@ -1,13 +1,16 @@
import { Document, STDIN } from '../../../document';
import { KNOWN_FORMATS } from '../../../formats'... | 4 | 2 | 0 | [{"id": "G0", "claim": "The verbose-branch ruleset check is unnecessary because ruleset seems to always be defined, so it was dropped.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The added guard should be written as `if (flags.quiet !== tru... | null |
stoplightio__spectral__1433 | stoplightio/spectral | 1,433 | defect | 8ceab21ad479c163f083032208da2d6e6e64de1f | a6d4981513f5d1ed136933c8b7e5e82acc9a38e9 | feat: rework error filtering to preserve sibling additionalProperties errors | This PR makes some minor modifications to the filtering logic of errors returned by AJV so that multiple `additionalProperties` errors within the same object are preserved and presented to the user.
**Checklist**
- [X] Tests added / updated
- [ ] Docs added / updated - NA
**Does this PR introduce a breaking c... | diff --git a/src/__tests__/__fixtures__/invalid-status-codes.oas3.json b/src/__tests__/__fixtures__/invalid-status-codes.oas3.json
new file mode 100644
index 0000000000..85f392ca9c
--- /dev/null
+++ b/src/__tests__/__fixtures__/invalid-status-codes.oas3.json
@@ -0,0 +1,64 @@
+{
+ "openapi": "3.0.0",
+ "info": {
+ ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new additionalProperties loop in prepareResults should use a for...of loop instead of forEach to iterate over the errors array, per the project's convention.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The two test... | null |
stoplightio__spectral__1440 | stoplightio/spectral | 1,440 | defect | baf388333311d5f2eef13546fcc5f29a0feb3647 | 1ea8aeac7c62e8e5084b818c9d6c267e6788de2f | feat(oas): add oas3-unused-component rule which detects all orphaned components | This PR creates a new oas3 rule `oas3-unused-component` which detects and reports any unreferenced component (except `securitySchemes`, which are not "referenced" in the normal way) in an OpenAPI document.
**Checklist**
- [X] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking... | diff --git a/docs/reference/openapi-rules.md b/docs/reference/openapi-rules.md
index ef3f659743..a770cdd024 100644
--- a/docs/reference/openapi-rules.md
+++ b/docs/reference/openapi-rules.md
@@ -584,6 +584,16 @@ _Warning:_ This rule may identify false positives when linting a specification
that acts as a library (a co... | 4 | 4 | 2 | [{"id": "G0", "claim": "The now-obsolete oas3-unused-components-schema rule should be dropped from the ruleset since the new oas3-unused-component rule overlaps with it.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new function should guard with !i... | null |
stoplightio__spectral__1465 | stoplightio/spectral | 1,465 | defect | ba9470ec2f83e79249f1ab7e31e5206e69b744c3 | 91e665d1738cb466efed290f5dcd4a8ad1060bc7 | fix: nested extends broken in rulesets | Fixes https://github.com/stoplightio/spectral/issues/1352
Fixes https://github.com/stoplightio/spectral/issues/1380
I'm going to split this PR into 2 smaller ones.
I cleaned up all tests we had, so that they don't rely on OAS ruleset as well as moved a few files around.
Prior to that, I spent a bit of time impr... | diff --git a/src/rule.ts b/src/rule.ts
index d53f70731..0d45535a2 100644
--- a/src/rule.ts
+++ b/src/rule.ts
@@ -3,26 +3,26 @@ import { JSONPathExpression } from 'nimma';
import { IDocument } from './document';
import { DEFAULT_SEVERITY_LEVEL, getDiagnosticSeverity } from './ruleset/severity';
-import { IGivenNode,... | 1 | 1 | 0 | [{"id": "G0", "claim": "Set `this.enabled = rule.enabled ?? true;` instead of `rule.enabled !== false`, since that seems more consistent with the other props and easier to read.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
stoplightio__spectral__1692 | stoplightio/spectral | 1,692 | defect | 43ed54caaf6f9772e2a3f041734c312c8752f2ee | 90d7dbbcac9db3b8bf6c69e63a0f5db584c3a50c | feat(core): support path aliases in rulesets | Closes #1680
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/docs/reference/error-handling.md b/docs/reference/error-handling.md
index 64de262e66..13ebfe647f 100644
--- a/docs/reference/error-handling.md
+++ b/docs/reference/error-handling.md
@@ -17,6 +17,7 @@
- a _valid_ JSON Path expression throws any exception
- message interpolation fails
+- a JSON Path alia... | 2 | 1 | 0 | [{"id": "G0", "claim": "The lazy Ajv instance getters should be extracted to a separate PR (note for himself to split that part out).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Pattern aliases would also be cool, so a re-usable pattern (e.g. `c-sty... | null |
stoplightio__spectral__1824 | stoplightio/spectral | 1,824 | defect | d37197d5bf5bfbc59308b73dbd8ffe1e5d7a5a95 | 2c9190845b367b9b8d688adeafa768629dbc4f64 | feat(cli): integrate ruleset-bundler | Related to https://github.com/stoplightio/platform-internal/issues/7847
Fixes https://github.com/stoplightio/spectral/issues/1821
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/packages/cli/package.json b/packages/cli/package.json
index 5bfdc89f6..52a912e29 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -32,12 +32,14 @@
"cli:debug": "node -r ts-node/register/transpile-only -r tsconfig-paths/register --inspect-brk src/index.ts"
},
"dependencie... | 2 | 2 | 1 | [{"id": "G0", "claim": "The CLI should surface a clearer error such as 'Could not read ruleset at {path}' instead of Rollup's 'Could not resolve entry module' wording when no ruleset exists at the given path.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cl... | null |
stoplightio__spectral__1840 | stoplightio/spectral | 1,840 | defect | 702f857735f15f4bd0c89032ce34dba63fb58dc0 | 81519e7bd98dfed2efb26097114fbc690e3a33bf | feat(core): support scoped aliases | Closes #1837
Needs https://github.com/stoplightio/spectral/pull/1838 https://github.com/stoplightio/spectral/pull/1839
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/packages/core/src/guards/isAggregateError.ts b/packages/core/src/guards/isAggregateError.ts
new file mode 100644
index 000000000..4d8cc3a80
--- /dev/null
+++ b/packages/core/src/guards/isAggregateError.ts
@@ -0,0 +1,5 @@
+import { isError } from 'lodash';
+
+export function isAggregateError(maybeAggregateE... | 2 | 1 | 1 | [{"id": "G0", "claim": "When a rule uses a scoped alias none of whose targets match the format of the linted document, Spectral should not throw an error and refuse to lint the file; the unresolvable alias should be ignored/dropped so the file still lints.", "category": "design", "verdict": "supported", "priority": "P1... | null |
stoplightio__spectral__2016 | stoplightio/spectral | 2,016 | defect | 1f472b9241b7803e62423eb3091bdeafdcdd860a | bf3ae2b457d69855c60d4fe919bf5ff7db928a64 | feat(core): support multiple JSONPath expressions for aliases | Related to https://github.com/stoplightio/platform-internal/issues/8141
Needed by https://github.com/stoplightio/spectral/pull/2018
Example usage https://github.com/stoplightio/spectral/blob/a2019f14f7db93d31effd795882c30d060a196fe/packages/rulesets/src/oas/index.ts#L38
I believe that once this one is in, we can... | diff --git a/docs/guides/4-custom-rulesets.md b/docs/guides/4-custom-rulesets.md
index 38aa27c6bc..5090ccf9bc 100644
--- a/docs/guides/4-custom-rulesets.md
+++ b/docs/guides/4-custom-rulesets.md
@@ -27,11 +27,13 @@ Spectral has [built-in functions](../reference/functions.md) such as `truthy` or
The `given` property ... | 3 | 2 | 0 | [{"id": "G0", "claim": "The JSON Schema definition block added to the aliases docs will confuse readers and should probably be deleted, since the examples are more helpful.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "The docs sentence about ref... | null |
stoplightio__spectral__2022 | stoplightio/spectral | 2,022 | defect | f1b2c2c81dbf5a3ddec4d3b212b4b942d0a88055 | 5deeba87c09e24581046f79ac6d9be270ae8ad84 | fix(ruleset-migrator): resolve npm packages correctly | Fixes #2019
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/packages/ruleset-migrator/package.json b/packages/ruleset-migrator/package.json
index eb14473c9..7848a2e49 100644
--- a/packages/ruleset-migrator/package.json
+++ b/packages/ruleset-migrator/package.json
@@ -33,7 +33,8 @@
"ast-types": "0.14.2",
"astring": "^1.7.5",
"reserved": "0.1.2",
- ... | 3 | 2 | 0 | [{"id": "G0", "claim": "A test case for the 'spectral:oas' import should be added to the isPackageImport spec.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The isPackageImport spec should include a test case for a versioned package import.", "category... | null |
stoplightio__spectral__2037 | stoplightio/spectral | 2,037 | defect | d724c17ced6557edb9c286bcf1821957de0b22bc | e23363b25299079f130fceab3de09af466a90b48 | feat(cli): support multiple formats and outputs at once | Closes https://github.com/stoplightio/spectral/issues/1970
Branched off https://github.com/stoplightio/spectral/pull/2011
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Additional context**
I didn't dare to... | diff --git a/docs/guides/2-cli.md b/docs/guides/2-cli.md
index 42cd278c1..ad5f39398 100644
--- a/docs/guides/2-cli.md
+++ b/docs/guides/2-cli.md
@@ -20,24 +20,26 @@ spectral lint ./reference/**/*.oas*.{json,yml,yaml}
Other options include:
-```text
- --version Show version number ... | 1 | 1 | 1 | [{"id": "G0", "claim": "There is no way to write one (or more) format outputs to a file while another format's output goes to stdout, i.e. the stdout default is not retained when more than one format is given.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
stoplightio__spectral__2046 | stoplightio/spectral | 2,046 | defect | 6b21eb19c94b8b6fb0e6b975fba74234690482e5 | e792e63337288f09b2a33b46cb0b99a256b34f3e | feat(rulesets): validate API security in oas-operation-security-defined | This PR adds checking in the function for oas[23]-operation-security-defined to also check the API-level security requirement to ensure it also only references defined security schemes.
I admit that it is stretching the intent of these rules a bit, to check the API-level definition in a rule that by its name would o... | diff --git a/packages/rulesets/src/oas/__tests__/oas2-operation-security-defined.test.ts b/packages/rulesets/src/oas/__tests__/oas2-operation-security-defined.test.ts
index df1431246b..92d714ac5f 100644
--- a/packages/rulesets/src/oas/__tests__/oas2-operation-security-defined.test.ts
+++ b/packages/rulesets/src/oas/__t... | 1 | 1 | 0 | [{"id": "G0", "claim": "The extra block scope wrapping the global security check appears unnecessary since `security` is not redeclared within the current scope, and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stoplightio__spectral__2101 | stoplightio/spectral | 2,101 | defect | 71b312e34c85d8b4255832757b4b5afa8c5062a5 | b9b5dea03e424a3a7a62f2f97c92d46a07054b1d | feat(rulesets): add rules for validation of server variables and channel parameters | Fixes #1102
**Checklist**
- [X] Tests added / updated
- [X] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [X] No
**Context**
Two new rules add the ability to validate variables in server address and parameters in channel address. All variables/parameters must be defi... | diff --git a/docs/reference/asyncapi-rules.md b/docs/reference/asyncapi-rules.md
index 4e488bbe22..260d4c50c0 100644
--- a/docs/reference/asyncapi-rules.md
+++ b/docs/reference/asyncapi-rules.md
@@ -24,6 +24,12 @@ Keep trailing slashes off of channel names, as it can cause some confusion. Most
**Recommended:** Yes
... | 3 | 3 | 0 | [{"id": "G0", "claim": "The rule name `asyncapi-channel-parameters-defined` should be the simpler `asyncapi-channel-parameters`.", "category": "naming", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The rule name `asyncapi-server-variables-defined` should be the simpler `async... | null |
stoplightio__spectral__2104 | stoplightio/spectral | 2,104 | defect | 71b312e34c85d8b4255832757b4b5afa8c5062a5 | b6f5f98a0f3ddac9ac28e0816f3f3003e3ed4efc | feat(rulesets): add rules for validation uniqueness of tag names | Fixes https://github.com/stoplightio/spectral/issues/2103
**Checklist**
- [X] Tests added / updated
- [X] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [X] No
**Additional context**
Part of #2100
Add rule for validation uniqueness of tag names:
**Bad Example**... | diff --git a/docs/reference/asyncapi-rules.md b/docs/reference/asyncapi-rules.md
index 4e488bbe22..43666cff40 100644
--- a/docs/reference/asyncapi-rules.md
+++ b/docs/reference/asyncapi-rules.md
@@ -341,6 +341,28 @@ tags:
**Recommended:** No
+### asyncapi-tags-uniqueness
+
+Tags have duplicate names (identifiers).... | 5 | 5 | 1 | [{"id": "G0", "claim": "The tag-uniqueness function is equally applicable to OpenAPI and should be shared across the default rulesets (e.g. from a shared directory under the rulesets package) instead of living only in the asyncapi package.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "intr... | null |
stoplightio__spectral__2126 | stoplightio/spectral | 2,126 | defect | 4ececf0770f821592ecf3490fe98bc9eb0619953 | 988ff9a54f4a72a9363b5cfe4846c2b54add7b08 | feat(rulesets): add rule to validate message's examples | Fixes #2125
**Checklist**
- [X] Tests added / updated
- [X] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [X] No
**Additional context**
This PR adds rule to validate message's examples: validate `payload` and `headers` field in each example according to the schema in... | diff --git a/docs/reference/asyncapi-rules.md b/docs/reference/asyncapi-rules.md
index 4e488bbe22..e36d6ae40a 100644
--- a/docs/reference/asyncapi-rules.md
+++ b/docs/reference/asyncapi-rules.md
@@ -126,6 +126,51 @@ info:
name: MIT
```
+### asyncapi-message-examples
+
+All `examples` in message object should fo... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new rule's description in index.ts is a 'Message...' placeholder and should be replaced with real text.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The function's input declaration should be `input: { type: 'object',... | null |
stoplightio__spectral__2132 | stoplightio/spectral | 2,132 | defect | 99c3c8f65caa38de35276a62dbac4735977e967a | db7b9ec5b9f421f04873c1f81ecea12e05c70579 | chore(core): improve ruleset typings | Extract typing-related changes from #2026
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/packages/core/package.json b/packages/core/package.json
index d58d697f5..b93c49a2e 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -19,11 +19,15 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
- "require": "./dist/index.js"
+ "default": "./dist/inde... | 1 | 1 | 0 | [{"id": "G0", "claim": "Asked whether the @stoplight/types bump to 13 done in this package is also planned for the other spectral packages.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stoplightio__spectral__2345 | stoplightio/spectral | 2,345 | defect | d0595e65ceb4362e1314aaed169f818747806cba | 362e74f5b371507a5e3124e6c74afc0061ca071f | feat(core): support end-user extensions in the rule definitions | This change introduces a user extensions for rule definitions.
**Problem**
As a user of Spectral, we want to keep additional metadata close to the rule definitions. E.g. when this rule is introduced, who is responsible, etc.
**Solution**
As it's not possible to foresee what kind of metadata users might need, th... | diff --git a/packages/core/src/ruleset/__tests__/ruleset.test.ts b/packages/core/src/ruleset/__tests__/ruleset.test.ts
index 7068adb21..d2e824478 100644
--- a/packages/core/src/ruleset/__tests__/ruleset.test.ts
+++ b/packages/core/src/ruleset/__tests__/ruleset.test.ts
@@ -315,6 +315,30 @@ describe('Ruleset', () => {
`... | 3 | 2 | 2 | [{"id": "G0", "claim": "The `RuleJson` type should not omit `extensions` (use `Omit<IRule, 'then'>`), so the new field stays part of the serialized rule type.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `toJSON` method should include `extensi... | null |
stoplightio__spectral__2408 | stoplightio/spectral | 2,408 | defect | d3bebe44d3f3e543592327ffbdf4393e2989ae5c | a0b3c946e6458007995ec731e2c188a136735c3b | fix(rulesets): avoid false errors from ajv | Fixes #2081.
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Screenshots**
If applicable, add screenshots or gifs to help demonstrate the changes. If not applicable, remove this screenshots section before creatin... | diff --git a/package.json b/package.json
index a2bee2699..300531ede 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,8 @@
"test.karma": "karma start",
"prepare": "husky install",
"prerelease": "patch-package",
- "release": "yarn prerelease && yarn workspaces foreach run release"
+ "release... | 1 | 1 | 0 | [{"id": "G0", "claim": "The hand-written recursive traversal in deExamplify should be replaced with `traverse` from `json-schema-traverse` to simplify the traversal.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stoplightio__spectral__2508 | stoplightio/spectral | 2,508 | defect | 13bec9f9cf2cdff094666352e8e3c121f0517ab8 | 275b50dc1060bf6e1a6766d8c278b3882dc29758 | feat(formatters): add GitHub Actions formatter | This pull requests add a built-in formatter for annotating errors in GitHub Actions.
Spectral already have spectral-action for running Spectral and annotating errors in the workflow. The action creates a new check entry to annotate, but sometimes the annotation is incorrectly attached to another job due to GitHub's ... | diff --git a/docs/guides/2-cli.md b/docs/guides/2-cli.md
index f38944c80..7bfd2e5ab 100644
--- a/docs/guides/2-cli.md
+++ b/docs/guides/2-cli.md
@@ -33,7 +33,8 @@ Other options include:
[string] [choices: "utf8", "ascii", "utf-8", "utf16le", "ucs2", "ucs-2", "base64", "latin1"] [default: "utf8"]
-f, --for... | 4 | 4 | 3 | [{"id": "G0", "claim": "The formatter should use `@stoplight/path` instead of requiring Node's built-in `path` module inline.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Exporting the github-actions formatter from the shared index.ts is wrong... | null |
stoplightio__spectral__2526 | stoplightio/spectral | 2,526 | defect | 2a553a977a03b6d5ece467fb537d9137becb4826 | 38988a563fd81c6c1e65f29e33297874343972ab | feat(rulesets): add oas3-server-variables rule | Closes #2524
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/packages/rulesets/src/asyncapi/functions/asyncApi2ChannelParameters.ts b/packages/rulesets/src/asyncapi/functions/asyncApi2ChannelParameters.ts
index 9c214e6fb..71a189fdc 100644
--- a/packages/rulesets/src/asyncapi/functions/asyncApi2ChannelParameters.ts
+++ b/packages/rulesets/src/asyncapi/functions/async... | 2 | 2 | 0 | [{"id": "G0", "claim": "The rule description should say 'no unused variables' rather than 'no redundant variables'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The redundant-variable result message should say 'unused defined' rather than 'redun... | null |
stoplightio__spectral__2581 | stoplightio/spectral | 2,581 | defect | 96eee89d3210931b8ffeffe44c44d7e9f610c0b0 | 3c61d56292f47d0655db8fdef1bd9eea206d050f | feat(rulesets): add oas3_1-servers-in-webhook and oas3_1-callbacks-in… | …-webhook rules
Fixes #[ISSUE_NUMBER].
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
> If indicated yes above, please describe the breaking change(s).
>
> **Remove this quote before creating the PR.**
**Scre... | diff --git a/docs/reference/openapi-rules.md b/docs/reference/openapi-rules.md
index d55e43772..8778ead34 100644
--- a/docs/reference/openapi-rules.md
+++ b/docs/reference/openapi-rules.md
@@ -922,3 +922,33 @@ servers:
```
In this example, both **`{region}`** and **`{version}`** variables are properly defined and u... | 2 | 2 | 2 | [{"id": "G0", "claim": "The oas3_1-servers-in-webhook rule should check inside the webhook operation, not at the webhooks object level.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The warning should be shown at both levels, not only at the webhoo... | null |
stoplightio__spectral__2632 | stoplightio/spectral | 2,632 | defect | 9e906eaa0e792d229e1fd553f018ab8e6afef12e | 271d950a960c014782659758f4c68dd16b993106 | feat(rulesets): add new rule that requires sibling items field for type array | Fixes #2595.
This PR adds a new `array-items` rule for OAS 3.0.x which requires schemas with "type: array" to have a sibling "items" field.
There are some additional changes present that make tests more stable.
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduc... | diff --git a/.nvmrc b/.nvmrc
index b009dfb9d..a58d2d2c2 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-lts/*
+18.18.2
\ No newline at end of file
diff --git a/packages/rulesets/src/oas/__tests__/array-items.test.ts b/packages/rulesets/src/oas/__tests__/array-items.test.ts
new file mode 100644
index 000000000..144ca5d6e
... | 3 | 1 | 0 | [{"id": "G0", "claim": "The new array-items rule should also apply to OpenAPI 3.1, not only oas3_0.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The array-items rule should detect a child (nested) schema, not only top-level array schemas.", "category":... | null |
stoplightio__spectral__2895 | stoplightio/spectral | 2,895 | defect | 59728e48e475664f1c9c19a2942bbd0cbfee3099 | 46ff57e9f8b593a7bbb3f73175bfa8c9aad13c49 | fix(formatters): Fix rendering of github actions documentationUrl | :: was rendered literally, which is not very useful. Instead print a descriptive string.
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/packages/formatters/src/__tests__/github-actions.jest.test.ts b/packages/formatters/src/__tests__/github-actions.jest.test.ts
index c81d76fec..556e4d17a 100644
--- a/packages/formatters/src/__tests__/github-actions.jest.test.ts
+++ b/packages/formatters/src/__tests__/github-actions.jest.test.ts
@@ -37,6 +3... | 1 | 1 | 1 | [{"id": "G0", "claim": "There is one test failure in the test-harness CI step that the author should look at.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
stoplightio__spectral__515 | stoplightio/spectral | 515 | defect | 69d99326c5bfe155d95ce7c4c79d7ea0930c146d | 1a6bac8bc7ee4a3063b1e4d61f8c2b163993bb6a | Do not validate description in parameters for links | Fixes #272
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/src/rulesets/oas/__tests__/parameter-description.ts b/src/rulesets/oas/__tests__/parameter-description.ts
index 37de60f45..7479993d2 100644
--- a/src/rulesets/oas/__tests__/parameter-description.ts
+++ b/src/rulesets/oas/__tests__/parameter-description.ts
@@ -155,4 +155,82 @@ describe('parameter-descriptio... | 2 | 2 | 1 | [{"id": "G0", "claim": "The single shared parameter-description rule cannot satisfy both OAS2 and OAS3 (parameters under links should not require a description), so for now it should be split into two separate rules, one for oas2 and one for oas3, until Spectral supports an array of paths.", "category": "design", "verd... | null |
stoplightio__spectral__737 | stoplightio/spectral | 737 | defect | 185ace7ea6b99c3fc1f9de7cd50369244de0d4c1 | c57a50e45ac4ee7dd93d58a4c28981549436f5b9 | chore: extract a result sorting function | From https://github.com/stoplightio/spectral/pull/681#discussion_r334885416 | diff --git a/src/cli/services/linter/linter.ts b/src/cli/services/linter/linter.ts
index 0520072bdd..45c0a21b48 100644
--- a/src/cli/services/linter/linter.ts
+++ b/src/cli/services/linter/linter.ts
@@ -17,7 +17,7 @@ import { isRuleEnabled } from '../../../runner';
import { IRuleResult, Spectral } from '../../../spect... | 7 | 5 | 1 | [{"id": "G0", "claim": "Use String.prototype.localeCompare instead of the hand-rolled strcmp when comparing strings.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "If no use case requires code to be undefined or a number, the code field should b... | null |
stoplightio__spectral__758 | stoplightio/spectral | 758 | defect | b1a205c6fcadf4e9dd2939af0b3bcae307bd423f | e01f19ebbe85f05487d2d60cb94a789a16cc69bb | feat(cli): accept stdin | Closes #757
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Additional context**
~Added isTTY env variable.
https://github.com/stoplightio/spectral/tree/chore/test-harness work has been pushed here. Still need t... | diff --git a/src/cli/commands/__tests__/lint.test.ts b/src/cli/commands/__tests__/lint.test.ts
index 044d5b112..97e99dc37 100644
--- a/src/cli/commands/__tests__/lint.test.ts
+++ b/src/cli/commands/__tests__/lint.test.ts
@@ -20,6 +20,7 @@ function run(command: string) {
describe('lint', () => {
let errorSpy: jest... | 3 | 3 | 0 | [{"id": "G0", "claim": "The variable `fds` in listFiles.ts could be renamed to `fileDescriptors` (or similar) because that is more readable than the abbreviation.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer does not understand wh... | null |
stoplightio__spectral__798 | stoplightio/spectral | 798 | defect | 52cf6b3cb2875b71fc05490ed692f29af2fbd243 | 8bd41a0b7a96363a438e638f1de36af9ff5cc5bc | feat: report unrecognized formats | Closes https://github.com/stoplightio/spectral/issues/678
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/docs/guides/cli.md b/docs/guides/cli.md
index 70f876b85..244e7b6c9 100644
--- a/docs/guides/cli.md
+++ b/docs/guides/cli.md
@@ -33,6 +33,7 @@ Other options include:
[string] [choices: "error", "warn", "info", "hint"] [default: "warn"]
--display-only-failures, -D only ou... | 7 | 3 | 1 | [{"id": "G0", "claim": "Warning about unrecognized formats by default everywhere is a concern — working on formatless files (Spectral rulesets, arbitrary JSON) in Studio would constantly produce complaints, so it should not be enabled by default everywhere.", "category": "design", "verdict": "opposed", "priority": "P1"... | null |
stoplightio__spectral__825 | stoplightio/spectral | 825 | defect | 11fe6389df02311e38e7ca457b823fd555b67265 | 1799862a46616909e5661764cc78c7ca379156a3 | Add two formatters: text, teamcity. | Closes https://github.com/stoplightio/spectral/issues/823 and https://github.com/stoplightio/spectral/issues/822.
The text formatter is close to the stylish but with no special formatting and a source:line:column suitable for navigation within an IDE console (IntelliJ specifically).
The teamcity formatter emits t... | diff --git a/.gitignore b/.gitignore
index ea39399a1..e90fa0607 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@
.env.production.local
.vscode
.idea
+.nvmrc
.nyc_output
.DS_Store
.awcache
diff --git a/src/cli/services/output.ts b/src/cli/services/output.ts
index ffd162e5a..6ec81f4ba 100644
--- a/src/cli... | 3 | 3 | 1 | [{"id": "G0", "claim": "The falsy check in escapeString should be `str === void 0` so that a valid value of 0 is not turned into an empty string.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The imports and escapeString's signature should use Opti... | null |
stoplightio__spectral__839 | stoplightio/spectral | 839 | defect | c8bd51280e76337082287097368a05e9dfbe21d9 | fa399455ac060bc90652af28b0140a3daea35c23 | fix: absolute paths | Fixes https://github.com/stoplightio/spectral/issues/608 and https://github.com/stoplightio/spectral/pull/685#issuecomment-562538996
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Additional context**
From now... | diff --git a/src/__tests__/linter.jest.test.ts b/src/__tests__/linter.jest.test.ts
index cbc744496..c74fa51c8 100644
--- a/src/__tests__/linter.jest.test.ts
+++ b/src/__tests__/linter.jest.test.ts
@@ -123,17 +123,17 @@ describe('Linter', () => {
expect.objectContaining({
code: 'empty-is-falsy',
... | 3 | 2 | 1 | [{"id": "G0", "claim": "Running the tip of the branch against the #658 repro case, the produced errors still reference paths that do not exist in the referenced file (no more components.schemas.Error.properties.error paths, but still paths./test.get.responses.400.* paths), despite the PR's stated aim of no longer produ... | null |
stoplightio__spectral__899 | stoplightio/spectral | 899 | defect | 32af13915bc5fc1b66781b2c7a879ab63c7c85b4 | c549669474494687cd1b9afaa2a84fcc34db8c24 | fix: example-value-or-externalValue too broad JsonPath expressions | Related to #883 (partially, see comments).
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Additional context**
$..examples is too broad and incorrectly complains about examples that contain a property examples, ... | diff --git a/src/rulesets/oas/index.json b/src/rulesets/oas/index.json
index 31df2cf16..b6adc2ed7 100644
--- a/src/rulesets/oas/index.json
+++ b/src/rulesets/oas/index.json
@@ -115,7 +115,12 @@
"description": "Example should have either a `value` or `externalValue` field.",
"recommended": true,
"ty... | 4 | 4 | 3 | [{"id": "G0", "claim": "Add a test that would only pass with this change, for instance one covering examples that contain a property named examples.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The rule currently applies to both OAS2 and OAS3, so the ... | null |
stoplightio__spectral__913 | stoplightio/spectral | 913 | defect | d391292f197966885d626995f989acdf4edf1a36 | c194d2c82b9b62671d1327e69828cce7b7900928 | feat: new rule to detect enum value that do not respect specified type | Fixes #570
**Checklist**
- [x] Tests added / updated
- [x] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
| diff --git a/src/functions/__tests__/formatedEnum.test.ts b/src/functions/__tests__/formatedEnum.test.ts
new file mode 100644
index 0000000000..210c81f734
--- /dev/null
+++ b/src/functions/__tests__/formatedEnum.test.ts
@@ -0,0 +1,56 @@
+import { formatedEnum } from '../formatedEnum';
+
+function runFormatedEnum(target... | 5 | 5 | 3 | [{"id": "G0", "claim": "The reporting threshold is hardcoded to 3 in the function; make it a configurable option of the function.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new rule's ruleset tests should include simple oas3-related test... | null |
stoplightio__spectral__914 | stoplightio/spectral | 914 | defect | 070b2e69d86d7318f91c8e9074ac554cec93ae7e | 7d126201b0e0cf23b968cfd332bffd38377cc74c | fix #894: oas3-valid-(content-)schema-example has problem with nullable | Fixes #894.
**Checklist**
- [x] Tests added / updated
- [ ] Docs added / updated
**Does this PR introduce a breaking change?**
- [ ] Yes
- [x] No
**Additional context**
This PR tries to solve #894.
~As the documentation for schemaPath states the sentence below, I guess it's fine to just turn on nu... | diff --git a/src/functions/__tests__/schema.test.ts b/src/functions/__tests__/schema.test.ts
index 54b128c18..64cf1006f 100644
--- a/src/functions/__tests__/schema.test.ts
+++ b/src/functions/__tests__/schema.test.ts
@@ -1,8 +1,8 @@
import { JSONSchema4, JSONSchema6 } from 'json-schema';
import { schema } from '../sc... | 9 | 6 | 2 | [{"id": "G0", "claim": "The change results in an additional \"meta-schema not available\" error in the console that makes the tests fail, and P0lip asks to address it by setting the ajv meta option to true and removing a couple of addMetaSchema calls.", "category": "correctness", "verdict": "supported", "priority": "P0... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.