﻿using Microsoft.AspNetCore.Mvc;

namespace EasyVersioning.AspNetCore.Demo.Controllers
{
    [Route("api/[controller]")]
    public class HelloWorldController : VersionedController
    {
        [ApiVersion("1")]
        [HttpGet]
        public IActionResult GetV1()
        {
            return Ok("Hello World v1!");
        }

        [ApiVersionFrom("2")]
        [HttpGet]
        public IActionResult Get()
        {
            return Ok("Hello World v2 & v3!");
        }
    }
}
