profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/macisamuele/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Samuele Maci macisamuele @Facebook London - United Kingdom

macisamuele/language-formatters-pre-commit-hooks 15

Collection of custom pre-commit hooks.

macisamuele/jsonschema-validator 2

Rust JsonSchema Validator

macisamuele/CalendarProvider-Lib 1

An utility library for the simplification of calendar's and event's management on Android.

macisamuele/json-schema-test-suite-rs 1

Procedural Macro to run JSON-Schema-Test-Suite

macisamuele/json-trait-rs 1

Rust interfaces (aka traits) to deal with objects as they are JSON objects without enforcing additional serialisation/deserialisation

macisamuele/actions-rs-grcov 0

📈 GitHub Action for code coverage reporting with grcov

macisamuele/aiobravado 0

asyncio-powered python client library for Swagger 2.0 services

macisamuele/backward_incompatiblity_talk 0

"What if I tell you that your specs are broken" talk material

macisamuele/bravado 0

Bravado is a python client library for Swagger 2.0 services

issue commentYelp/swagger-gradle-codegen

OpenAPI 3.0 compatibility

Hi everyone, is there any updates for this request?

joaobiriba

comment created time in 10 minutes

push eventYelp/swagger-spec-compatibility

ATRAN2

commit sha a7e2c8e81a89112c19a62a1e326d891366d77c08

Update build.yml

view details

push time in 8 hours

push eventYelp/swagger-spec-compatibility

Andy Tran

commit sha 0355b0117b4e797d24535edb08ca70d2d565959f

Bump base python version to 3.7

view details

push time in 8 hours

push eventYelp/swagger-spec-compatibility

Andy Tran

commit sha 261a4247cc283ba0f905686771b5ffc7d046d5ca

v1.2.4

view details

push time in 9 hours

created tagYelp/swagger-spec-compatibility

tagv1.2.4

Python library to check Swagger Spec backward compatibility

created time in 9 hours

push eventYelp/swagger-spec-compatibility

Andy Tran

commit sha da898d52a9ab4aba0b9db72528f49ca63ca48450

CORESERV-10844 Fix ChangedAdditionalPropertiesToFalse Rule Fix the rule so that it only triggers when additionalProperties is set to False as the rule describes.

view details

Andy Tran

commit sha 60d967c3153811862364982c81938b5748307f05

Update test, fix pre-commit issues

view details

Andy Tran

commit sha 5ad6bcf650caee0eaf6e4a843183cd4d3f4fb5f6

Add simpler test case for ChangedAdditionalPropertiesToFalse. Make the check be more specific with field accessing

view details

ATRAN2

commit sha c348dad1c24ae20142743a6581e95381759a7330

Merge pull request #36 from Yelp/CORESERV-10844_fix-change_additional_properties_to_false_rule CORESERV-10844 Fix ChangedAdditionalPropertiesToFalse Rule

view details

push time in 9 hours

PR merged Yelp/swagger-spec-compatibility

CORESERV-10844 Fix ChangedAdditionalPropertiesToFalse Rule

Description

Fix the rule so that it only triggers when additionalProperties is set to False as the rule describes. Before this rule would trigger upon any change to additionalProperties, even if it's just a change in shape of an additionalProperties object which led to a lot of false alarms. additionalProperties can be an object, and changing it can be a backwards compatible operation.

Notes for the reviewer

additional_properties_diff.additionalProperties has two fields, old and new. Those contain the additionalProperties values between the old spec and new spec respectively for a diff in an additionalProperties object.

+138 -1

2 comments

3 changed files

ATRAN2

pr closed time in 9 hours

pull request commentYelp/swagger-spec-compatibility

CORESERV-10844 Fix ChangedAdditionalPropertiesToFalse Rule

lgtm

Sorry for the delay on the response :)

Oh no problem, thank you for reviewing the change!

ATRAN2

comment created time in 9 hours

pull request commentYelp/bravado

use threading.TIMEOUT_MAX for timeout

@macisamuele I noticed you reviewed another recent PR :) Any chance you could look over this one, too? Do you also have merge and PyPI release permissions for this repo?

tschaume

comment created time in 11 hours

startedLDRAlighieri/Corbind

started time in a day

startedgradle/gradle

started time in a day

startedCloudef/bemenu

started time in a day

startedmacisamuele/language-formatters-pre-commit-hooks

started time in 2 days

startedWPO-Foundation/webpagetest-github-action

started time in 3 days

pull request commentYelp/swagger-spec-compatibility

CORESERV-10844 Fix ChangedAdditionalPropertiesToFalse Rule

Hey @macisamuele if you have some extra time, can you take a look at this PR one more time? Only if you're not busy, I can ping some other folks otherwise Thanks!

ATRAN2

comment created time in 4 days

startedjunegunn/fzf

started time in 5 days

starteddenisidoro/navi

started time in 5 days

issue commentStranger6667/jsonschema-rs

patternProperties interferes with properties

One possible solution to this would be to use fancy_regex in place of regex, but I'm not sure what the performance implications would be there...

I looked into this a bit more, and it's far from trivial to swap these out. Many of the fancy-regex methods like Regex.is_match return a Result instead of a simple primitive value (probably as a result of their use of backtracking VMs), which means the signature of most of the jsonschema functions and methods would have to change as well.

duckontheweb

comment created time in 5 days

startedjdb8/webpack-repo

started time in 6 days

startedjdb8/js-repo

started time in 6 days

issue commentStranger6667/jsonschema-rs

patternProperties interferes with properties

The CompilationError happens because regex does not support look-around assertions (rust-lang/regex#127), which is not a bug in jsonschema.

One possible solution to this would be to use fancy-regex in place of regex, but I'm not sure what the performance implications would be there...

duckontheweb

comment created time in 7 days

issue commentStranger6667/jsonschema-rs

patternProperties interferes with properties

The CompilationError happens because regex does not support look-around assertions (rust-lang/regex#127), which is not a bug in jsonschema.

However, it seems like this is also the cause of the original issue. If I change the "patternProperties" regex to use the plain character set equivalent of that negative look-behind ("^([^e]|e($|[^o])).*") then things work as expected (example here).

It seems like the real bug is that compilation should have returned an error in the original example.

duckontheweb

comment created time in 7 days

issue commentStranger6667/jsonschema-rs

patternProperties interferes with properties

Hi @duckontheweb !

Thank you for an awesome bug report :) I'd be happy to review a PR, sure. Otherwise, I think that I'll have some time over the weekend to check why the bug is happening

duckontheweb

comment created time in 7 days

issue commentStranger6667/jsonschema-rs

patternProperties interferes with properties

In the process of trying to debug this with different schema combinations I also uncovered a case where trying to compile a valid schema leads to a SchemaError.

Here is the schema:

{
  "type": "object",
  "properties": {
    "eo:cloud_cover": {
      "type": "number"
    }
  },
  "patternProperties": {
    "^(?!eo:)": {}
  }
}

Failing example here

duckontheweb

comment created time in 7 days

issue commentStranger6667/jsonschema-rs

patternProperties interferes with properties

I'm happy to take a crack at a PR, but I'm a complete Rust novice, so it might be a little ugly at first...

duckontheweb

comment created time in 7 days

issue openedStranger6667/jsonschema-rs

patternProperties interferes with properties

It seems like the presence of "patternProperties" interferes with validation that should happen in "properties".

This replit shows an example of an instance that should fail validation (and does fail in jsonschemavalidator.net). If you comment out the "patternProperties" portion of the schema, it fails as expected.

I don't have a good enough understanding of the jsonschema internals, but it seems like this could be related to changes from #173 .

created time in 8 days

issue openedYelp/bravado-core

collectionFormat array list of lists

Fails to trim "[" "]" brackets when converting to string causing marshalling to fail.

JSON {"description":"connected solar system pairs", "in":"query", "items": { "collectionFormat":"pipes", "items": { "format":"int32", "type":"integer" }, "maxItems":2, "minItems":2, "type":"array", "uniqueItems":true}, "maxItems":100, "name":"connections", "type":"array", "uniqueItems":true }

Python array_test = [[30000142,30002801], [30002801,30002661]]

API response (error="failed to coerce value '[30000142' into type integer (format: int32)

Note presense of "[30000142" in integer. Confirmed by exploring value at https://github.com/Yelp/bravado-core/blob/382db874b7b838dcfd169b0ce490d6a447ad6ff2/bravado_core/param.py#L145

created time in 8 days

PublicEvent