Project

General

Profile

Revision 6eb9a868

ID6eb9a868c379877c08577bbcdd61725646a068a9
Parent bca2429d
Child 587dbb82

Added by Andreas Kohlbecker over 3 years ago

ref #7348 preliminar swagger documentation on RegistrationDTOController and RegistrationController

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/RegistrationController.java
29 29
import eu.etaxonomy.cdm.model.name.Registration;
30 30
import eu.etaxonomy.cdm.model.name.RegistrationStatus;
31 31
import io.swagger.annotations.Api;
32
import io.swagger.annotations.ApiImplicitParam;
33
import io.swagger.annotations.ApiImplicitParams;
34
import io.swagger.annotations.ApiOperation;
32 35

  
33 36
/**
34 37
 * TODO write controller documentation
......
78 81
        return reg;
79 82
    }
80 83

  
84
    @ApiImplicitParams({
85
        @ApiImplicitParam(name = "identifier", value = "The persitent identifier of the Registration.", required = true, dataType = "string", paramType = "path"),
86
    })
87
    @ApiOperation(value = "Finds Registration by persitent identifier.",
88
        notes = "The identifier passed as paramter must be unique in the database otherwise the server will responde with the HTTP error code: " + HttpServletResponse.SC_PRECONDITION_FAILED
89
    )
81 90
    @RequestMapping(value="identifier/**", method = RequestMethod.GET)
82 91
    public Registration doGetByIdentifier(
83 92
            HttpServletRequest request,
......
100 109
    }
101 110

  
102 111

  
112
    @ApiImplicitParams({
113
        @ApiImplicitParam(name = "identifier", value = "The persitent identifier of the Registration", required = true, dataType = "string", paramType = "path"),
114
    })
103 115
    @RequestMapping(value="identifier/**", method = RequestMethod.GET, params={"validateUniqueness"})
104 116
    public Pager<Registration> doPageByIdentifier(
105 117
            @RequestParam(value = "pageNumber", required = true) Integer pageIndex,
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/RegistrationDTOController.java
37 37
import eu.etaxonomy.cdm.remote.editor.UuidList;
38 38
import eu.etaxonomy.cdm.remote.editor.term.RegistrationStatusList;
39 39
import io.swagger.annotations.Api;
40
import io.swagger.annotations.ApiImplicitParam;
41
import io.swagger.annotations.ApiImplicitParams;
42
import io.swagger.annotations.ApiOperation;
40 43

  
41 44
/**
42 45
 * TODO write controller documentation
......
83 86
        binder.registerCustomEditor(UUID.class, new UUIDPropertyEditor());
84 87
    }
85 88

  
89
    @ApiImplicitParams({
90
        @ApiImplicitParam(name = "identifier", value = "The persitent identifier of the Registration.", required = true, dataType = "string", paramType = "path"),
91
    })
92
    @ApiOperation(value = "Finds Registration by persitent identifier.",
93
        notes = "The identifier passed as paramter must be unique in the database otherwise the server will responde with the HTTP error code: " + HttpServletResponse.SC_PRECONDITION_FAILED,
94
        response = Registration.class
95
    )
86 96
    @RequestMapping(value="identifier/**", method = RequestMethod.GET)
87 97
    public RegistrationDTO doGetByIdentifier(
88 98
            HttpServletRequest request,
......
101 111
        }
102 112
    }
103 113

  
114
    @ApiImplicitParams({
115
        @ApiImplicitParam(name = "identifier", value = "The persitent identifier of the Registration.", required = true, dataType = "string", paramType = "path"),
116
    })
117
    @ApiOperation(value = "Finds Registrations by persitent identifier."
118
    )
104 119
    @RequestMapping(value="identifier/**", method = RequestMethod.GET, params={"validateUniqueness"})
105 120
    public Pager<RegistrationDTO> doPageByIdentifier(
106 121
            @RequestParam(value = "pageNumber", required=true) Integer pageIndex,
......
117 132
        return regDTOPager;
118 133
    }
119 134

  
120

  
121 135
    @RequestMapping(value="find", method = RequestMethod.GET)
122 136
    public Pager<RegistrationDTO> doFind(
123 137
            @RequestParam(value = "submitterUuid", required=false) UUID submitterUuid,

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)