php-json-schema-generator icon indicating copy to clipboard operation
php-json-schema-generator copied to clipboard

Curved bracket missing in example

Open k4rl1 opened this issue 7 years ago • 7 comments

There is an error in your example:

$output = JSONSchemaGenerator\Generator::fromJson('{"a":{"b":2}');

One curved bracket is missing.

$output = JSONSchemaGenerator\Generator::fromJson('{"a":{"b":2}}');

k4rl1 avatar May 22 '18 15:05 k4rl1

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@1d8076b). Click here to learn what that means. The diff coverage is 84.17%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master       #3   +/-   ##
=========================================
  Coverage          ?   76.89%           
  Complexity        ?      142           
=========================================
  Files             ?       13           
  Lines             ?      329           
  Branches          ?        0           
=========================================
  Hits              ?      253           
  Misses            ?       76           
  Partials          ?        0
Impacted Files Coverage Δ Complexity Δ
...nerator/Mappers/Exceptions/UnmappableException.php 0% <ø> (ø) 1 <0> (?)
...tor/Structure/Exceptions/OverwriteKeyException.php 0% <ø> (ø) 1 <0> (?)
...r/Parsers/Exceptions/NoStructureFoundException.php 0% <ø> (ø) 1 <0> (?)
.../Parsers/Exceptions/InvalidConfigItemException.php 0% <ø> (ø) 1 <0> (?)
...rator/Parsers/Exceptions/InvalidParamException.php 0% <ø> (ø) 1 <0> (?)
...rsers/Exceptions/UnprocessableSubjectException.php 0% <ø> (ø) 1 <0> (?)
...ator/Parsers/Exceptions/NoParserFoundException.php 0% <ø> (ø) 1 <0> (?)
src/JSONSchemaGenerator/Generator.php 100% <100%> (ø) 2 <2> (?)
src/JSONSchemaGenerator/Structure/Schema.php 66.66% <66.66%> (ø) 5 <5> (?)
src/JSONSchemaGenerator/Structure/Definition.php 78.83% <78.83%> (ø) 60 <60> (?)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1d8076b...f5fa455. Read the comment docs.

codecov-io avatar May 22 '18 15:05 codecov-io

Oh wow. you have been working on this? It's been so long since I wrote it.

solvire avatar May 23 '18 16:05 solvire

:D yeah I tried but the json was too complex. I appreciate your work ;)

k4rl1 avatar May 30 '18 06:05 k4rl1

You made a ton of changes it seems. They all look like they were from last year. Can you describe a little bit about what you were doing and how it changes the application?

They all looked okay, but there are enough that I'd like to be sure of what your direction is.

solvire avatar May 30 '18 15:05 solvire

I dont make any change :)

k4rl1 avatar Jun 04 '18 06:06 k4rl1

yes yes you are right.

i messaged the author of those changes. I didn't realize until i looked in deeper. I'll see if I can line things up a little and get this PR merged in. I just need to know what direction he was taking things.

solvire avatar Jun 04 '18 14:06 solvire

Hello there. Yes I wrote those changes to make it work on newer PHP version I think. Truly I don't remember why exactly I'd done all these changes, but I guess it was because the json-schema output did not fit my needs, or maybe the configuration was not enough for my usage. I currently use this fork to accelerate documentation of our APIs by generating dummy json-schema from our REST API responses. Sorry to let you with all these changes without more explanations. Hope it helps.

evaisse avatar Jun 04 '18 15:06 evaisse