Skip to content

Conversation

@CuteShaos
Copy link
Contributor

There are two errors in the annotation configuration of the flinkStart / flinkCancel method:

  1. Error in @OpenAPI.Param(bindFor = "appId"):
    This annotation binds the value of parameter id to the appId field of the FlinkApplication object. However, the FlinkApplication class does not have an appId field; the actual field name is id. This will result in ineffective data binding.
  2. Error in SpEL expression @PermissionScope(app = "#app.appId"):
    This expression attempts to access the appId property of the FlinkApplication object. Since the FlinkApplication class doesn't have an appId field, it will throw the exception: Property or field 'appId' cannot be found on object of type 'org.apache.streampark.console.core.entity.FlinkApplication'

What changes were proposed in this pull request

Issue Number: close #4121

Brief change log

  • Remove the bindFor = "appId" attribute from the @openapi.

  • Change @PermissionScope(app = "#app.appId") to @PermissionScope(app = "#app.id")

  • Caused by location:
    at org.apache.streampark.console.core.aspect.PermissionAspect.getId(PermissionAspect.java:118)

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts

  • Dependencies (does it add or upgrade a dependency): no

…g.apache.streampark.console.core.entity.FlinkApplication'
@sonarqubecloud
Copy link

Copy link
Member

@wolfboys wolfboys left a comment

Choose a reason for hiding this comment

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

LGTM

@wolfboys wolfboys merged commit 7799538 into apache:dev Aug 31, 2025
54 of 102 checks passed
@CuteShaos CuteShaos deleted the fix-openAPI branch September 1, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Bug Property or field 'appId' cannot be found on object of type 'org.apache.streampark.console.core.entity.Application'

2 participants