API: settings->contributedSettings: documentation does not match reality (and neither works) (OD-2242)
Sebastian opened 1 year ago

Hi there,

when calling /projects/x/setting, the expected contributedSettings section should be something like this according to the docs:

"contributedSettings" : {
  "string" : {
    "@type" : "NtfyNotificationSetting" ,
    "notifications" : [ {

while in fact it is:

"contributedSettings" : {
  "io.onedev.server.plugin.notification.ntfy.NtfyNotificationSetting" : {
    "@type" : "NtfyNotificationSetting" ,
    "notifications": [ {

In addition to that, using either of both strings for updating the settings, the request results in status code 400 and:

Could not resolve type id 'NtfyNotificationSetting' as a subtype of `io.onedev.server.web.page.project.setting.ContributedProjectSetting`: known type ids = [] (for POJO property 'contributedSettings')
 at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 1307] (through reference chain: io.onedev.server.rest.resource.ProjectResource$ProjectSetting["contributedSettings"]->java.util.LinkedHashMap["string"])

Best regards,

Sebastian

  • Sebastian changed fields 1 year ago
    Name Previous Value Current Value
    Affected Versions
    most recent OneDev version
    11.6.9
  • Sebastian changed title 1 year ago
    Previous Value Current Value
    API: settings->contributedSettings: documentation does not match reality (and doesn't work)
    API: settings->contributedSettings: documentation does not match reality (and neither works)
  • OneDev changed state to 'Closed' 1 year ago
    Previous Value Current Value
    Open
    Closed
  • OneDev commented 1 year ago

    State changed as code fixing the issue is committed (be37d8fc)

  • Sebastian commented 12 months ago

    Thank you very much! 😃

  • OneDev changed state to 'Released' 12 months ago
    Previous Value Current Value
    Closed
    Released
  • OneDev commented 12 months ago

    State changed as build OD-5855 is successful

issue 1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
11.6.9
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2242
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover