Add an attribute to identify and communicate deprecated REST endpoint calls

Issue #950 resolved
Brian Lewis repo owner created an issue

Develop [Deprecated] attribute that will add a custom header X-Deprecated to the response.

This will assist in the tidy-up of names in #949

Comments (3)

  1. Brian Lewis reporter

    Deprecations reported to the client are now displayed in the console:

    When Deprecation Response is ‘Continue’ the deprecated call has Status = 200 and the console message is a Warning.

    When DeprecatedResponse = RaiseError Status = 410 (Gone) and the console message is an error:

            [HttpGet]
            [Deprecated("api/warehouse/teachers?report", DeprecationResponse.RaiseError)]
            [Deflatable]
            [Route("teachercount")]         // use 
            public object TeacherCount()
            {
                IDataResult ds = Ds.TeacherCount();
                return ds.ResultSet;
            }
    

  2. Log in to comment