<commit_before>package design

import (
	. "github.com/goadesign/goa/design"
	. "github.com/goadesign/goa/design/apidsl"
)

var _ = API("gwentapi", func() {
	Title("Gwent API")
	Description("A consumption-only API of all Gwent data")
	BasePath("/")
	Host("localhost:8080")
	Scheme("https")
})

var _ = Resource("faction", func() {
	DefaultMedia(FactionMedia)
	BasePath("/factions")

	Action("show", func() {
		Description("Return faction with given id")
		Routing(GET("/:factionID"))
		Params(func() {
			Param("factionID", String, "Faction ID")
		})
		Response(OK)
		Response(NotFound)

	})
})

var FactionMedia = MediaType("application/vnd.gwentapi.faction+json", func() {
	Description("A faction")
	Attributes(func() {
		Attribute("id", Integer, "Unique faction ID")
		Attribute("href")
		Attribute("name")
	})
})<commit_msg>Default View added to FactionMedia<commit_after>package design

import (
	. "github.com/goadesign/goa/design"
	. "github.com/goadesign/goa/design/apidsl"
)

var _ = API("gwentapi", func() {
	Title("Gwent API")
	Description("A consumption-only API of all Gwent data")
	BasePath("/")
	Host("localhost:8080")
	Scheme("https")
})

var _ = Resource("faction", func() {
	DefaultMedia(FactionMedia)
	BasePath("/factions")

	Action("show", func() {
		Description("Return faction with given id")
		Routing(GET("/:factionID"))
		Params(func() {
			Param("factionID", String, "Faction ID")
		})
		Response(OK)
		Response(NotFound)

	})
})

var FactionMedia = MediaType("application/vnd.gwentapi.faction+json", func() {
	Description("A faction")
	Attributes(func() {
		Attribute("id", Integer, "Unique faction ID")
		Attribute("href", String, "API href for making requests on the faction")
		Attribute("name", String, "Name of the faction")
	})
	View("default", func() {
		Attribute("id")
		Attribute("href")
		Attribute("name")
	})
})
{'fraction_non_alphanumeric': 0.1766612641815235, 'fraction_numerical': 0.004321988114532685, 'mean_word_length': 5.173333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1726597', 'n_tokens_mistral': 680, 'n_tokens_neox': 632, 'n_words': 131}