Skip to content

Conversation

@recena
Copy link

@recena recena commented Jun 6, 2015

  • - Introduce a universal method to manage return formats
  • - Update all remote API commands
  • - UI hyperlinks should return the data in pretty format by details ("raw data" links from container and image pages)
  • - Built-in API documentation should describe the option (1 global section would be enough)
  • - Several words in README.md

@recena
Copy link
Author

recena commented Jun 6, 2015

@oleg-nenashev @jtnord Your review would be useful

Copy link
Member

Choose a reason for hiding this comment

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

Please avoid empty-line changes

@oleg-nenashev
Copy link
Member

The behavior should be optional, because non-pretty JSONs are preferable for the automated processing. I would propose to pass the mode via an additional enum-based parameter (d.g. mode=json, json-pretty, xml), which would alter the behavior of toJSONResponse() (could be also renamed)

@recena
Copy link
Author

recena commented Jun 7, 2015

@oleg-nenashev @jtnord Your review would be useful, thanks in advance.

Copy link
Member

Choose a reason for hiding this comment

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

I would throw an error in the case of the unsupported format

@oleg-nenashev
Copy link
Member

👍 for the concept, noted minor improvement proposals in the code

@recena
Copy link
Author

recena commented Jun 7, 2015

@oleg-nenashev I've reviewed your last recommendations.

Copy link
Member

Choose a reason for hiding this comment

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

I would also keep it in enum class, but it's optional at the current stage

@oleg-nenashev
Copy link
Member

@recena Thanks a lot for the adjustments. In the pull-request description I've noted several UI/UX-related things, which would be useful to address in this pull request. BTW, we can do it later.

@recena
Copy link
Author

recena commented Jun 8, 2015

@oleg-nenashev I've reviewed the last adjustments.

Copy link
Member

Choose a reason for hiding this comment

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

why the object type and not the primitive?

Copy link
Author

Choose a reason for hiding this comment

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

@rsandell Done.

@rsandell
Copy link
Member

rsandell commented Jun 8, 2015

public boolean isPretty() other than that :+1

Copy link
Member

Choose a reason for hiding this comment

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

and the format of format is...

@recena
Copy link
Author

recena commented Jun 21, 2015

jenkins-28728

@oleg-nenashev This was a previous step before adding new documentation related to new formats. What do you thing about it?

@recena
Copy link
Author

recena commented Jun 21, 2015

@oleg-nenashev I don't know what you mean with UI hyperlinks should return the data in pretty format by details ("raw data" links from container and image pages). Could you put an example?

Copy link
Member

Choose a reason for hiding this comment

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

Weak 👎 on this CSS in the plugin. If you want to add specific highlighting, it's better to create appropriate controls in Jenkins core. These styles may be an interim solution only

Copy link
Author

Choose a reason for hiding this comment

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

@oleg-nenashev

  • Could you tell if exist another plugin that includes its own API documentation?
  • This change is not only highlighting, it also includes semantic in the markup
  • There are a lot of plugins that includes its own CSS style in jelly templates
  • If Jenkins Core includes a proposal to attend this, I'll remove the local CSS styles

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I've missed the comment somehow. I propose to decouple the help formatting to a separate pull request, because it requires additional discussion and does not block the main proposed functionality.

Copy link
Author

Choose a reason for hiding this comment

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

@oleg-nenashev Before revert my work (and throw my time to the trash), I'd like to know your technical reasons why you reject this.

Copy link
Member

Choose a reason for hiding this comment

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

@recena
Just to clarify... I don't propose to throw your work to trash. I just propose to submit it as a separate pull request in order to review it separately from the functional changes.

@recena recena changed the title Related to [JENKINS-28728]: Support Pretty JSON outputs [JENKINS-28728]: Support Pretty JSON outputs Jul 5, 2015
@oleg-nenashev oleg-nenashev changed the title [JENKINS-28728]: Support Pretty JSON outputs [WiP] [JENKINS-28728]: Support Pretty JSON outputs Aug 6, 2015
@oleg-nenashev
Copy link
Member

@recena
Let's put the discussion on hold for several days. After that I can come up with proposals regarding the API documentation layout changes. Your proposals are very useful, but I would like to somehow move them to the Jenkins core's level.

Copy link
Member

Choose a reason for hiding this comment

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

I don't see a need in such change, but I'm OK to replace it.

Copy link
Author

Choose a reason for hiding this comment

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

@oleg-nenashev I don't remember why, but I had to change this for any reason.

@oleg-nenashev
Copy link
Member

Hi @recena
I'm OK with replacing the entire text in API text files. The only thing I'm concerned about is the usage of internal CSS files without style definitions. It causes a technical debt when Jenkins core starts supporting API documentation templates out-of-the-box. Since I have not found time to propose a patch to Jenkins core, I finally conclude it can be merged as is and reworked later.

So, now we just need to finish the action items, merge the PR with the current branch and then squash commits.

Copy link
Member

Choose a reason for hiding this comment

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

The description below describes the structure of the json field. The new formatting may be quite confusing, a text should be adjusted at least

Copy link
Author

Choose a reason for hiding this comment

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

@oleg-nenashev I'll take a look.

@recena
Copy link
Author

recena commented Aug 7, 2015

@oleg-nenashev As I said in above comment, if Jenkins core provides a global proposal for that, I'll send a new PR to review it.

@recena
Copy link
Author

recena commented Aug 7, 2015

@oleg-nenashev I hope to send new modifications as soon as possible

@oleg-nenashev
Copy link
Member

CC @alexanderrtaylor. BTW I feel it's stuck

@recena
Copy link
Author

recena commented Oct 2, 2017

Two years ago...

@alexanderrtaylor
Copy link

Sorry @recena I am looking it over now. Can you re-trigger the tests though? They are still showing as "pending"

Copy link

@alexanderrtaylor alexanderrtaylor left a comment

Choose a reason for hiding this comment

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

Pending a successful rebuild this Looks good and works for me locally

@recena
Copy link
Author

recena commented Feb 13, 2018

@alexanderrtaylor I'll take a look later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants