Skip to content

Conversation

enchobelezirev
Copy link
Contributor

Implementation of the Routes API(https://v3-apidocs.cloudfoundry.org/version/3.77.0/index.html#routes) in the client.

Copy link
Contributor

@twoseat twoseat left a comment

Choose a reason for hiding this comment

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

Thanks for the extensive PR @enchobelezirev! I've made some comments but nothing major.

import org.cloudfoundry.client.v3.applications.UpdateApplicationRequest;
import org.cloudfoundry.client.v3.applications.UpdateApplicationResponse;
import org.cloudfoundry.client.v3.applications.ListApplicationRoutesRequest;
import org.cloudfoundry.client.v3.applications.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

House style is to specify all imports, no wildcards.

import org.cloudfoundry.client.v3.spaces.ListSpacesRequest;
import org.cloudfoundry.client.v3.spaces.ListSpacesResponse;
import org.cloudfoundry.client.v3.spaces.SpacesV3;
import org.cloudfoundry.client.v3.spaces.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

House style is to specify all imports, no wildcards.

* The metadata query
*/
@FilterParameter("label_selector")
@Nullable
Copy link
Contributor

Choose a reason for hiding this comment

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

FilterParameter has an implicit Nullable so this shouldn't be necessary. Having said that I've noticed I've done it in one or two places, so either we've both made the same mistake or there's a reason for this that I've forgotten. Can you clarify?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have looked how to make the POJOs from the already existing places :) So, if it is mistake, I could remove the @nullable from everywhere

Copy link
Contributor

Choose a reason for hiding this comment

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

I think remove it for now, if it causes problems it should turn up in integration testing and I'll fix it then. I did just notice that the javadoc you have is wrong for this though.

@FilterParameter("domain_guids")
abstract List<String> getDomainGuids();


Copy link
Contributor

Choose a reason for hiding this comment

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

Remove extra line

* The metadata
*/
@JsonProperty("metadata")
@Nullable
Copy link
Contributor

Choose a reason for hiding this comment

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

See earlier Nullable comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this applicable for the @JsonProperty annotation?

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right, I'm wrong, ignore this one!

* The metadata query
*/
@FilterParameter("label_selector")
@Nullable
Copy link
Contributor

Choose a reason for hiding this comment

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

see earlier Nullable comment

*/
@Nullable
@JsonProperty("host")
public abstract String getHost();
Copy link
Contributor

Choose a reason for hiding this comment

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

Public shouldn't be needed here

* The route id
*/
@JsonIgnore
public abstract String getRouteId();
Copy link
Contributor

Choose a reason for hiding this comment

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

Public shouldn't be needed here


@Value.Immutable
public abstract class _DeleteUnmappedRoutesRequest {
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Add blank line here

public final class CreateRouteRequestTest {

@Test(expected = IllegalStateException.class)
public void invalid() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should test for each missing field (seems overly detailed, but I've found errors this way in the past)

@enchobelezirev
Copy link
Contributor Author

Hello @twoseat,
I have created a commit with the Organised imports and the fixed comments.
The thing about @nullable on non-collection variable does not work - I have tested it.
Could you review the PR once again and tell me whether it is fine? Thanks!

@aegershman
Copy link

aegershman commented Jun 12, 2020

any thoughts on if/when v3 routes support could be incorporated? is it in a holding pattern at the moment? thanks all for all you do EDIT^ just noticed this was added to 'todo' in cf3 15 days ago 👍

@twoseat
Copy link
Contributor

twoseat commented Jun 15, 2020

@aegershman We're currently having a push on v3 implementation, so while I don't have an exact date I'd expect it to be in the next few weeks as I'm focussing first on areas where we have PRs such as this.

@twoseat twoseat self-assigned this Jun 29, 2020
@twoseat twoseat added this to the 3.26.0.RELEASE milestone Jun 29, 2020
@twoseat twoseat closed this in 46d6ae6 Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants