Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRY spec generation, Integrate changes to v1 #337

Merged
merged 51 commits into from
Feb 5, 2017
Merged

Conversation

pwalsh
Copy link
Member

@pwalsh pwalsh commented Dec 14, 2016

Implements the following

@pwalsh pwalsh self-assigned this Dec 14, 2016
@pwalsh
Copy link
Member Author

pwalsh commented Dec 19, 2016

@rufuspollock everything I am working on is converging on this branch. I'm now doing a commit per issue. There is no better way around it now - this branch changes the way the specs are written, and has brought many ambiguities (due to wording, etc.) to the surface. To view this branch you will have to run it locally. Honestly, I'm very happy with the results of this work towards a solid v1 of all specs. I'll also ping you when I remove the WIP status.

@pwalsh pwalsh mentioned this pull request Dec 19, 2016
@pwalsh pwalsh mentioned this pull request Feb 5, 2017
@pwalsh pwalsh merged commit 1345d39 into gh-pages Feb 5, 2017
@pwalsh pwalsh deleted the feature/do-it-better branch February 5, 2017 15:55
@roll
Copy link
Member

roll commented Feb 6, 2017

So based on this approach and if I've got it right datapackage.json should be changed e.g. from this:

resources:
  - name: name1
    schema: {...}
    data: [...]
  - name: name2
    schema: {...}
    data: [...]

to

resources:
  - name: name1
    schema: #schema-ref1
    data: [#data-ref2]
  - name: name2
    schema: #schema-ref2
    data: [#data-ref2]
schemas:
  schema1: {...}
  schema2: {...}
data:
  data1: {...}
  data2: {...}

I suppose it's good for JSONSchema purity and for implementations but it looks like we're making datapackage non manual editable - consider 10 resources long datapackage where to change one resource you need to edit file in 3 different places. It could lead to many errors people unwillingness to working on it by hands.

Also a descriptor for a single resource should look like this?

name: name
schema: #real-schema
data: [#real-data]
real-schema: {...}
real-data: {...}

Or I've got it wrong..

@pwalsh @rufuspollock

@pwalsh
Copy link
Member Author

pwalsh commented Feb 6, 2017

@roll sorry I'm a bit confused by the above, and how it is JSON Schema-specific?

I think you are focused specifically on the JSON Pointer support, which is new, but does not replace normal URL and file path support. i.e.: schema works just like it always has, and data works just like the proposal for path was destined too - we've just removed the direct inlining of data on the data property, directly to solve issues we talked about in #336 and something that I also thought you were supporting in terms of simplifying implementations ( cf. #336 (comment) )

@roll
Copy link
Member

roll commented Feb 6, 2017

So schema is still inlinable?

upd.
My bad missed that this PR closed ohh (also has wrong understanding of schema thing)

@pwalsh
Copy link
Member Author

pwalsh commented Feb 6, 2017

@roll yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants