Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Conversation

rynowak
Copy link
Member

@rynowak rynowak commented Sep 14, 2017

This puts a de-facto metadata approach in the box to declare
unambiguously 'Hey, I am an API!'.

I think this is worth us doing at this point because I haven't really
seen anyone in the community running with targeting conventions at
equivalence classes of controllers.

Now that we're putting API-specific, opinionated behaviors in the box,
we need to away to make it opt-in and declarative.

@rynowak
Copy link
Member Author

rynowak commented Sep 14, 2017


using Microsoft.AspNetCore.Mvc.Filters;

namespace Microsoft.AspNetCore.Mvc.Internal
Copy link
Member Author

Choose a reason for hiding this comment

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

This isn't really the right place for this interface, but we don't have another good existing one.

Copy link
Contributor

Choose a reason for hiding this comment

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

What exactly is this interface? I read the doc comment but it isn't clear to me why it's needed. What else would implement it? Or is it to avoid coupling to the ApiControllerAttribute?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep. The last one.

For instance this attribute is only supported on classes, because that's how we image you'll want to use it. But there's nothing wrong with you implementing your own marker.

It short, there's value in separating policy from specification

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, makes sense.

This puts a de-facto metadata approach in the box to declare
unambiguously 'Hey, I am an API!'.

I think this is worth us doing at this point because I haven't really
seen anyone in the community running with targeting conventions at
equivalence classes of controllers.

Now that we're putting API-specific, opinionated behaviors in the box,
we need to away to make it opt-in and declarative.
@rynowak rynowak force-pushed the rynowak/api-controller branch from 8485ed4 to e114911 Compare September 18, 2017 19:43
@rynowak rynowak merged commit e114911 into dev Sep 18, 2017
@rynowak rynowak deleted the rynowak/api-controller branch September 18, 2017 20:11
namespace Microsoft.AspNetCore.Mvc
{
/// <summary>
/// Indicates that a type and all derived types are used to serve HTTP API responses. The presense of

Choose a reason for hiding this comment

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

presence :trollface:

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi, it looks like you are posting on a closed issue/PR/commit!

We're very likely to lose track of your bug/feedback/question unless you:

  1. Open a new issue
  2. Explain very clearly what you need help with
  3. If you think you have found a bug, include detailed repro steps so that we can investigate the problem

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants