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

Changing JSON data based on issue 29 and 30 #34

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

khermano
Copy link
Collaborator

resolves #29


@NotNull
@Valid
public Environment environment;
public String publicTag;
Copy link
Collaborator

@petrberan petrberan Sep 13, 2024

Choose a reason for hiding this comment

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

No longer true, we should get access to Gitlab.cee (as in the tag doesn't have to only public)


@NotNull
public String revision;
public String version;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Version of what? :)


public static String getJsonStreamName(String streamFromFrontend) {
for (Stream stream : Stream.values()) {
if (stream.frontEnd.equals(streamFromFrontend) || stream.backEnd.equals(streamFromFrontend)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the end, the FE should send only BE data, meaning that we will change this later to just stream.backEnd.equals(streamFromFrontend) , but let's keep this for now

.contentType(MediaType.APPLICATION_JSON)
.when().post("/build-trigger/trigger")
.then()
.statusCode(500);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now this got me thinking - in case we receive a stream that is not in the list, the correct code we should be returning is not 500, but 422

https://httpwg.org/specs/rfc9110.html#status.422

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think so, too.

Copy link
Collaborator

@petrberan petrberan left a comment

Choose a reason for hiding this comment

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

LGTM

@petrberan petrberan merged commit ba03206 into jboss-set:main Sep 18, 2024
2 checks passed
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.

Change JSON data
2 participants