Propose changes to format allowing greater flexibility. #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation of part of the discussion from apibyexample/abe-python#11.
This may not be the direction the spec wants to go in, and if not then that is absolutely fine.
Proposal
That the spec be more flexible in allowing different use cases whilst still maintaining backwards compatibility with existing workflows.
What is being changed.
Currently:
Each json spec file is meant to declare "one API call". This means that all examples in the file should use the same method and path - the only changes should be to request bodies.
Removing some strictness:
Each example in a spec file can override the path. I believe the idea is that this is only for expansion of eg. regexes of a path at the top. Currently at least in abe-python this isn't inforced (ie if an example in the spec defines some completely different path there will be no errors)
I think this is a good thing in that it allows the user to have more control over what they want to illustrate with an ABE file.
I'd like to go one further and have the spec explicitly support overriding of both
pathandmethodin the spec to allow people to use it in different ways:They could use it to show the full set of GET requests available across all resources.
Example
I've made a change to the Readme in order to hopefully illustrate what I mean.