Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Conversation

@kylef
Copy link
Member

@kylef kylef commented Aug 29, 2015

Currently the Paw plugin keeps the API Blueprint AST structure intact when importing within the Paw hierarchy. Unfortunately this provides poor UX when there are unnamed resource groups and unnamed examples (most examples are usually unnamed).

Let's take a look at an example, here is the previous behaviour of the Polls API example blueprint:

screen shot 2015-08-29 at 14 42 17

There are various annoyances in this example:

  • There is an "Unnamed" resource group, which results in an unnecessary group within Paw
  • None of the examples are named so they are all called "Example"
  • There is only a single example in these cases, so there is no need to create a group for the single element. In this case we can just create the request with the name of the action when there is no example name.

Here is how it looks afterwards:

screen shot 2015-08-29 at 14 32 56

screen shot 2015-08-29 at 15 15 31

Closes #8

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be resourceGroup?

@pksunkara
Copy link
Contributor

lgtm. I might be confused on the variable names though. Maybe the request and requestGroup are names for PAW?

@kylef
Copy link
Member Author

kylef commented Aug 31, 2015

@pksunkara The object types are called Request and RequestGroup inside Paw.

pksunkara added a commit that referenced this pull request Aug 31, 2015
Don't nest unnamed resource groups, resources and examples
@pksunkara pksunkara merged commit 0b6f1ac into master Aug 31, 2015
@pksunkara pksunkara deleted the kylef/unnamed branch August 31, 2015 16:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants