Initial commit AB#12

This commit is contained in:
Noah Spannbauer
2023-01-24 20:03:13 -06:00
commit c2d8bd1838
91 changed files with 29613 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.DS_Store

0
README.md Normal file
View File

22
app/.babelrc Normal file
View File

@@ -0,0 +1,22 @@
{
"presets": [
"@babel/preset-env",
[
"@babel/preset-react",
{
"runtime": "automatic"
}
],
"@babel/preset-typescript"
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
},
],
"istanbul"
],
}

2
app/.eslintignore Normal file
View File

@@ -0,0 +1,2 @@
node_modules
cypress

14
app/.eslintrc Normal file
View File

@@ -0,0 +1,14 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
]
}

4
app/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
node_modules
.nyc_output
coverage-cy
dist

8
app/.nycrc Normal file
View File

@@ -0,0 +1,8 @@
{
"all": true,
"excludeAfterRemap": true,
"report-dir": "coverage-cy",
"reporter": ["text", "json", "html"],
"extension": [".js"],
"include": "src/**/*.js"
}

4
app/.prettierignore Normal file
View File

@@ -0,0 +1,4 @@
.eslintrc
package-lock.json
package.json
tsconfig.json

5
app/.prettierrc Normal file
View File

@@ -0,0 +1,5 @@
{
"jsxSingleQuote": true,
"singleQuote": true,
"trailingComma": "none"
}

0
app/README.md Normal file
View File

69
app/cypress.config.ts Normal file
View File

@@ -0,0 +1,69 @@
import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// return Object.assign({}, config, require('@bahmutov/cypress-code-coverage/plugin')(on, config));
require('@bahmutov/cypress-code-coverage/plugin')(on, config);
return config;
},
// baseUrl: 'http://localhost:3000',
// specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}'
},
component: {
devServer: {
framework: "react",
bundler: "webpack",
// here are the additional settings from Gleb's instructions
webpackConfig: {
mode: "development",
devtool: false,
module: {
rules: [
// application and Cypress files are bundled like React components
// and instrumented using the babel-plugin-istanbul
{
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json'],
},
use: {
loader: "babel-loader",
options: {
presets: [
"@babel/preset-env",
"@babel/preset-react",
'@babel/preset-typescript'
],
plugins: [
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
},
],
"istanbul"
],
},
},
},
{
test: /\.(s(a|c)ss)$/,
use: ['css-loader', 'sass-loader'],
}
],
},
},
},
setupNodeEvents(on, config) {
// return Object.assign({}, config, require('@bahmutov/cypress-code-coverage/plugin')(on, config))
require('@bahmutov/cypress-code-coverage/plugin')(on, config)
return config
},
specPattern: 'src/**/**/*.cy.{js,jsx,ts,tsx}'
},
});

View File

@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

View File

@@ -0,0 +1,37 @@
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
//
// declare global {
// namespace Cypress {
// interface Chainable {
// login(email: string, password: string): Chainable<void>
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>

View File

@@ -0,0 +1,41 @@
// ***********************************************************
// This example support/component.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
// import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')
import { mount } from 'cypress/react18'
import '@bahmutov/cypress-code-coverage/support';
// Augment the Cypress namespace to include type definitions for
// your custom command.
// Alternatively, can be defined in cypress/support/component.d.ts
// with a <reference path="./component" /> at the top of your spec.
declare global {
namespace Cypress {
interface Chainable {
mount: typeof mount
}
}
}
Cypress.Commands.add('mount', mount)
// Example use:
// cy.mount(<MyComponent />)

View File

@@ -0,0 +1 @@
import '@bahmutov/cypress-code-coverage/support';

Binary file not shown.

1
app/declaration.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
declare module '*.scss';

12
app/index.html Normal file
View File

@@ -0,0 +1,12 @@
<html>
<head lang="en">
<title>MLB Gameday</title>
<style>
body {
margin: 0;
}
</style>
</html>
<body>
<div id="app-root"></div>
</body>

26331
app/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

74
app/package.json Normal file
View File

@@ -0,0 +1,74 @@
{
"name": "mlb-gameday",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack serve --port 3000",
"build": "NODE_ENV=production webpack",
"cy:run": "npx cypress run --component",
"test": "start-server-and-test start http://localhost:3000 cy:run",
"lint": "eslint ./src --fix",
"format": "prettier --write ./src"
},
"repository": {
"type": "git",
"url": "git+https://github.com/noahspannbauer/react-mlb-schedule-js.git"
},
"author": "Noah Spannbauer",
"license": "ISC",
"bugs": {
"url": "https://github.com/noahspannbauer/react-mlb-schedule-js/issues"
},
"homepage": "https://github.com/noahspannbauer/react-mlb-schedule-js#readme",
"simple-git-hooks": {
"pre-commit": "pretty-quick --staged && npx lint-staged"
},
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.20.13",
"@bahmutov/cypress-code-coverage": "^1.3.2",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"@typescript-eslint/parser": "^5.48.2",
"babel-loader": "^9.1.2",
"babel-plugin-istanbul": "^6.1.1",
"css-loader": "^6.7.3",
"cypress": "^12.3.0",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"html-webpack-plugin": "^5.5.0",
"istanbul-lib-coverage": "^3.2.0",
"lint-staged": "^13.1.0",
"mini-css-extract-plugin": "^2.7.2",
"node-sass": "^8.0.0",
"nyc": "^15.1.0",
"prettier": "^2.8.3",
"pretty-quick": "^3.1.3",
"sass-loader": "^13.2.0",
"simple-git-hooks": "^2.8.1",
"start-server-and-test": "^1.15.3",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.4",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
},
"dependencies": {
"@apollo/client": "^3.7.3",
"@fluentui/react": "^8.104.2",
"classnames": "^2.3.2",
"graphql": "^16.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-grid-system": "^8.1.6",
"react-router-dom": "^6.6.1"
}
}

View File

@@ -0,0 +1,39 @@
import React from 'react';
import { Routes, Route, useLocation } from 'react-router-dom';
import { Container, Row, Col } from 'react-grid-system';
import { initializeIcons } from '@fluentui/font-icons-mdl2';
import Menu from '../menu/Menu';
import Venues from '../venues/Venues';
initializeIcons();
const App: React.FC<unknown> = () => {
const location = useLocation();
return (
<Container fluid={true} style={{ padding: '0' }}>
<Row>
<Col sm={6}>Goodbye!</Col>
<Col sm={6}>Hello!</Col>
</Row>
<Row>
<Col sm={3}>
<Menu
selectedKey={
location.pathname === '/'
? 'home'
: location.pathname.replace('/', '')
}
/>
</Col>
<Col>
<Routes>
<Route path='venues' element={<Venues />} />
</Routes>
</Col>
</Row>
</Container>
);
};
export default App;

View File

@@ -0,0 +1,3 @@
export interface IMenuProps {
selectedKey: string;
}

View File

@@ -0,0 +1,29 @@
import React from 'react';
import { IMenuProps } from './IMenuProps';
import {
Nav,
INavLinkGroup
} from '@fluentui/react/lib/Nav';
const Menu: React.FC<IMenuProps> = (props: IMenuProps) => {
const navLinkGroups: INavLinkGroup[] = [
{
links: [
{
name: 'Home',
url: 'http://localhost:3000',
key: 'home'
},
{
name: 'Venues',
url: 'http://localhost:3000/venues',
key: 'venues'
}
]
}
];
return <Nav groups={navLinkGroups} selectedKey={props.selectedKey} />;
};
export default Menu;

View File

@@ -0,0 +1,6 @@
export interface IPaginatorProps {
totalPageCount: number;
currentPage: number;
pageSize: number;
onPageChange: (newCurrentPage: number) => void;
}

View File

@@ -0,0 +1,23 @@
.paginator {
.paginatorContainer {
display: flex;
direction: row;
justify-content: center;
padding: 20px;
}
.paginatorLink {
display: flex;
direction: row;
justify-content: center;
height: 32px;
margin: 4px 4px 0 4px;
min-width: 24px;
}
.paginatorButton {
button {
background-color: transparent !important;
}
}
}

View File

@@ -0,0 +1,160 @@
import React from 'react';
import { IPaginatorProps } from './IPaginatorProps';
import styles from './Paginator.module.scss';
import {
IconButton
} from '@fluentui/react/lib/Button';
import { Link } from '@fluentui/react/lib/Link';
const range = (start: number, end: number) => {
return [...Array(end).keys()].map((element) => element + start);
};
const Paginator: React.FC<IPaginatorProps> = ({
totalPageCount,
currentPage,
pageSize,
onPageChange
}: IPaginatorProps) => {
const pages: number[] = range(1, totalPageCount);
return (
<div className={styles.paginator}>
<div className={styles.paginatorContainer}>
<div className={styles.paginatorButton}>
<IconButton
iconProps={{ iconName: 'DoubleChevronLeft' }}
disabled={currentPage === 1}
onClick={() => onPageChange(1)}
/>
</div>
<div className={styles.paginatorButton}>
<IconButton
iconProps={{ iconName: 'ChevronLeft' }}
disabled={currentPage === 1}
onClick={() => onPageChange(currentPage - 1)}
/>
</div>
{pages.map((page) => {
return (
<div>
<Link
className={styles.paginatorLink}
disabled={page === currentPage}
onClick={() => onPageChange(page)}
>
{page}
</Link>
</div>
);
})}
<div className={styles.paginatorButton}>
<IconButton
iconProps={{ iconName: 'ChevronRight' }}
disabled={currentPage === totalPageCount}
onClick={() => onPageChange(currentPage + 1)}
/>
</div>
<div className={styles.paginatorButton}>
<IconButton
iconProps={{ iconName: 'DoubleChevronRight' }}
disabled={currentPage === totalPageCount}
onClick={() => onPageChange(totalPageCount)}
/>
</div>
</div>
</div>
);
// const ellipses = '...';
// const paginationRange: (string | number)[] | undefined = useMemo(() => {
// const siblingCount = 2;
// const totalPageNumbers = 1;
// const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
// console.log(leftSiblingIndex)
// const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPageCount);
// console.log(rightSiblingIndex)
// const shouldShowLeftDots = leftSiblingIndex > 2;
// const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
// const firstPageIndex = 1;
// const lastPageIndex = totalPageCount;
// const range = (start: number, end: number) => {
// let length = end - start + 1;
// return Array.from({ length }, (_, idx) => idx + start);
// };
// if (totalPageNumbers >= totalPageCount) {
// return range(1, totalPageCount)
// }
// if (!shouldShowLeftDots && shouldShowRightDots) {
// let leftItemCount = 3 + 2 * siblingCount;
// let leftRange = range(1, leftItemCount);
// return [...leftRange, ellipses, totalPageCount]
// }
// if (shouldShowLeftDots && !shouldShowRightDots) {
// let rightItemCount = 3 + 2 * siblingCount;
// let rightRange = range(
// totalPageCount - rightItemCount + 1,
// totalPageCount
// );
// return [firstPageIndex, ellipses, ...rightRange];
// }
// if (shouldShowLeftDots && shouldShowRightDots) {
// let middleRange = range(leftSiblingIndex, rightSiblingIndex);
// return [firstPageIndex, ellipses, ...middleRange, ellipses, lastPageIndex];
// }
// }, [totalPageCount, currentPage, pageSize]);
// // let lastPage: string | number = paginationRange ? paginationRange[paginationRange.length - 1] :
// const onPrevious = () => {
// onPageChange(currentPage - 1);
// }
// const onNext = () => {
// onPageChange(currentPage + 1);
// }
// useEffect(() => {
// console.log(paginationRange)
// }, [paginationRange])
// return (
// <Container fluid={true} style={{ padding: '0' }}>
// <Row>
// <Col>
// <IconButton
// iconProps={{ iconName: 'ChevronLeft' }}
// disabled={currentPage === 1}
// onClick={onPrevious}
// />
// </Col>
// {paginationRange?.map((pageNumber: any) => {
// if (pageNumber === ellipses) {
// return <div>dots</div>
// } else {
// return <Link
// onClick={() => onPageChange(parseInt(pageNumber))}
// underline
// >
// {pageNumber}
// </Link>
// }
// })}
// <Col>
// <IconButton
// iconProps={{ iconName: 'ChevronRight' }}
// // disabled={currentPage === lastPage}
// onClick={onNext}
// />
// </Col>
// </Row>
// </Container>
// )
};
export default Paginator;

View File

@@ -0,0 +1,13 @@
import { ICommandBarItemProps } from '@fluentui/react/lib/CommandBar';
import { IVenue } from '../../models/IVenue';
export interface IVenuesState {
items: IVenue[];
totalItemCount: number | null;
totalPageCount: number | null;
currentPageNumber: number;
pageSize: number;
selectedItems: IVenue[];
commandBarItems: ICommandBarItemProps[];
isPanelOpen: boolean;
}

View File

@@ -0,0 +1,104 @@
import React from 'react';
import AppContextProvider from '../../context/AppContextProvider';
import Venues from './Venues';
import { MockedProvider } from '@apollo/client/testing';
import { GET_VENUES } from '../../constants/graphQL';
const mocks: any[] = [
{
request: {
query: GET_VENUES,
variables: {
pageNumber: 1,
pageSize: 10
}
},
result: {
data: {
venues: {
currentPage: 1,
errors: null,
message: null,
pageSize: 10,
succeeded: true,
totalItemCount: 55,
totalPageCount: 6,
results: [
{
active: 'True',
id: 32,
link: '/api/v1/venues/32',
name: 'American Family Field'
},
{
active: 'True',
id: 2518,
link: '/api/v1/venues/2518',
name: 'American Family Fields of Phoenix'
},
{
active: true,
id: 1,
link: '/api/v1/venues/1',
name: 'Angel Stadium'
},
{
active: true,
id: 2700,
link: '/api/v1/venues/2700',
name: 'BayCare Ballpark'
},
{
active: true,
id: 2889,
link: '/api/v1/venues/2889',
name: 'Busch Stadium'
},
{
active: true,
id: 3809,
link: '/api/v1/venues/3809',
name: 'Camelback Ranch'
},
{
active: true,
id: 2534,
link: '/api/v1/venues/2534',
name: 'Charlotte Sports Park'
},
{
active: true,
id: 15,
link: '/api/v1/venues/15',
name: 'Chase Field'
},
{
active: true,
id: 3289,
link: '/api/v1/venues/3289',
name: 'Citi Field'
},
{
active: true,
id: 2681,
link: '/api/v1/venues/2681',
name: 'Citizens Bank Park'
}
]
}
}
}
}
];
describe('Venues', () => {
it('renders', () => {
cy.mount(
<AppContextProvider>
<MockedProvider mocks={mocks} addTypename={false}>
<Venues />
</MockedProvider>
</AppContextProvider>
);
});
});

View File

@@ -0,0 +1,177 @@
import React, { useEffect, useReducer } from 'react';
import { useQuery } from '@apollo/client';
import {
CommandBar,
ICommandBarItemProps
} from '@fluentui/react/lib/CommandBar';
import {
DetailsList,
IColumn,
Selection,
SelectionMode
} from '@fluentui/react/lib/DetailsList';
import { MessageBar, MessageBarType } from '@fluentui/react/lib/MessageBar';
import { Panel } from '@fluentui/react/lib/Panel';
import Paginator from '../paginator/Paginator';
import { Spinner, SpinnerSize } from '@fluentui/react/lib/Spinner';
import { initialState, reducer } from './reducer';
import { useAppContext } from '../../hooks/appContext/UseAppContext';
import { GET_VENUES } from '../../constants/graphQL';
import { INotification } from '../../models/INotification';
import { IVenue } from '../../models/IVenue';
const Venues: React.FC<unknown> = () => {
const [state, dispatch] = useReducer(reducer, initialState);
const appContext = useAppContext();
const currentPageNumber = state.currentPageNumber;
const pageSize = state.pageSize;
const { data, loading, error, refetch } = useQuery(GET_VENUES, {
variables: {
pageNumber: currentPageNumber,
pageSize: pageSize
}
});
const columns: IColumn[] = [
{
key: 'name',
name: 'Name',
fieldName: 'name',
minWidth: 100,
isResizable: true
}
];
const selection: Selection = new Selection({
onSelectionChanged: () =>
dispatch({ type: 'SET_SELECTED_ITEM', payload: selection.getSelection() })
});
const onIsPanelOpen = () => {
dispatch({ type: 'SET_IS_PANEL_OPEN', payload: !state.isPanelOpen });
};
const onDismissMessageBar = () => {
const notification: INotification = {
...appContext.state.notification,
isVisible: false
};
appContext.dispatch({ type: 'SET_NOTIFICATION', payload: notification });
};
const onPageChange = (newCurrentPage: number) => {
console.log(newCurrentPage);
dispatch({ type: 'SET_CURRENT_PAGE_NUMBER', payload: newCurrentPage });
refetch({
pageNumber: newCurrentPage,
pageSize: pageSize
});
};
useEffect(() => {
dispatch({
type: 'SET_COMMAND_BAR_ITEMS',
payload: [
{
key: 'openItem',
text: 'Open',
iconProps: { iconName: 'OpenPane' },
onClick: onIsPanelOpen,
disabled: true
}
]
});
}, []);
useEffect(() => {
console.log(JSON.stringify(data));
if (data) {
dispatch({
type: 'SET_ITEMS',
payload: {
items: data.venues.results,
totalItemCount: data.venues.totalItemCount,
totalPageCount: data.venues.totalPageCount
}
});
}
}, [data]);
useEffect(() => {
const notification: INotification = {
messageBarType: MessageBarType.error,
message: error?.message,
isMultiline: false,
isVisible: false
};
appContext.dispatch({ type: 'SET_NOTIFICATION', payload: notification });
}, [error]);
useEffect(() => {
if (state.selectedItems.length > 0 && state.commandBarItems.length > 0) {
const newCommandBarItems = state.commandBarItems.map(
(commandBarItem: ICommandBarItemProps) => {
return {
...commandBarItem,
disabled: false
};
}
);
dispatch({ type: 'SET_COMMAND_BAR_ITEMS', payload: newCommandBarItems });
}
}, [state.selectedItems]);
return (
<div>
{loading && <Spinner size={SpinnerSize.large} />}
{!loading && (
<React.Fragment>
{appContext.state.notification?.isVisible && (
<MessageBar
messageBarType={appContext.state.notification?.messageBarType}
isMultiline={appContext.state.notification?.isMultiline}
onDismiss={onDismissMessageBar}
>
{appContext.state.notification?.message}
</MessageBar>
)}
<CommandBar items={state.commandBarItems} />
<DetailsList
columns={columns}
items={state.items}
selection={selection}
selectionMode={SelectionMode.single}
selectionPreservedOnEmptyClick={true}
/>
<Paginator
totalPageCount={data.venues.totalPageCount}
currentPage={state.currentPageNumber}
pageSize={state.pageSize}
onPageChange={onPageChange}
/>
<Panel
headerText='Venue'
isOpen={state.isPanelOpen}
onDismiss={onIsPanelOpen}
>
{state.selectedItems.length > 0 &&
state.selectedItems.map((item: IVenue) => {
return (
<React.Fragment>
<p>{item.name}</p>
<p>{item.id}</p>
<p>{item.link}</p>
<p>{item.active}</p>
</React.Fragment>
);
})}
</Panel>
</React.Fragment>
)}
</div>
);
};
export default Venues;

View File

@@ -0,0 +1,73 @@
import { IVenuesState } from './IVenuesState';
import { IVenue } from '../../models/IVenue';
import { ICommandBarItemProps } from '@fluentui/react/lib/CommandBar';
import { IObjectWithKey } from '@fluentui/react';
export type Action =
| {
type: 'SET_ITEMS';
payload: {
items: IVenue[];
totalItemCount: number;
totalPageCount: number;
};
}
| { type: 'SET_CURRENT_PAGE_NUMBER'; payload: number }
| { type: 'SET_PAGE_SIZE'; payload: number }
| { type: 'SET_SELECTED_ITEM'; payload: IObjectWithKey[] }
| { type: 'SET_COMMAND_BAR_ITEMS'; payload: ICommandBarItemProps[] }
| { type: 'SET_IS_PANEL_OPEN'; payload: boolean };
export const initialState: IVenuesState = {
items: [],
totalItemCount: null,
totalPageCount: null,
currentPageNumber: 1,
pageSize: 10,
selectedItems: [],
commandBarItems: [],
isPanelOpen: false
};
export const reducer = (state: IVenuesState, action: Action): IVenuesState => {
switch (action.type) {
case 'SET_ITEMS': {
return {
...state,
items: action.payload.items,
totalItemCount: action.payload.totalItemCount,
totalPageCount: action.payload.totalPageCount
};
}
case 'SET_CURRENT_PAGE_NUMBER': {
return {
...state,
currentPageNumber: action.payload
};
}
case 'SET_PAGE_SIZE': {
return {
...state,
pageSize: action.payload
};
}
case 'SET_SELECTED_ITEM': {
return {
...state,
selectedItems: <IVenue[]>action.payload
};
}
case 'SET_COMMAND_BAR_ITEMS': {
return {
...state,
commandBarItems: action.payload
};
}
case 'SET_IS_PANEL_OPEN': {
return {
...state,
isPanelOpen: action.payload
};
}
}
};

View File

@@ -0,0 +1,21 @@
import { gql } from '@apollo/client';
export const GET_VENUES = gql`
query GetVenues($pageNumber: Int, $pageSize: Int) {
venues(pageNumber: $pageNumber, pageSize: $pageSize) {
currentPage
errors
message
pageSize
succeeded
totalItemCount
totalPageCount
results {
active
id
link
name
}
}
}
`;

View File

@@ -0,0 +1,5 @@
import { Context, createContext } from 'react';
import { IAppContextProps } from './IAppContextProps';
export const AppContext: Context<IAppContextProps> =
createContext<IAppContextProps>({} as IAppContextProps);

View File

@@ -0,0 +1,25 @@
import React, { useMemo, useReducer } from 'react';
import { AppContext } from './AppContext';
import { IAppContextProps } from './IAppContextProps';
import { IAppContextProviderProps } from './IAppContextProviderProps';
import { initialState, reducer } from './reducer';
const AppContextProvider: React.FC<IAppContextProviderProps> = (
props: IAppContextProviderProps
) => {
const [state, dispatch] = useReducer(reducer, initialState);
const contextValue: IAppContextProps = useMemo(() => {
return {
state,
dispatch
};
}, [state, dispatch]);
return (
<AppContext.Provider value={contextValue}>
{props.children}
</AppContext.Provider>
);
};
export default AppContextProvider;

View File

@@ -0,0 +1,8 @@
import React from 'react';
import { IAppContextState } from './IAppContextState';
import { Action } from './reducer';
export interface IAppContextProps {
state: IAppContextState;
dispatch: React.Dispatch<Action>;
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
export interface IAppContextProviderProps {
children: React.ReactNode;
}

View File

@@ -0,0 +1,5 @@
import { INotification } from '../models/INotification';
export interface IAppContextState {
notification: INotification | undefined;
}

View File

@@ -0,0 +1,28 @@
import { MessageBarType } from '@fluentui/react';
import { INotification } from '../models/INotification';
import { IAppContextState } from './IAppContextState';
export type Action = { type: 'SET_NOTIFICATION'; payload: INotification };
export const initialState: IAppContextState = {
notification: {
messageBarType: MessageBarType.info,
message: 'Blah blah blah',
isMultiline: false,
isVisible: true
}
};
export const reducer = (
state: IAppContextState,
action: Action
): IAppContextState => {
switch (action.type) {
case 'SET_NOTIFICATION': {
return {
...state,
notification: action.payload
};
}
}
};

View File

@@ -0,0 +1,11 @@
import { useContext } from 'react';
import { AppContext } from '../../context/AppContext';
export const useAppContext = () => {
const { state, dispatch } = useContext(AppContext);
return {
state,
dispatch
};
};

View File

@@ -0,0 +1,6 @@
export interface IUsePaginationProps {
totalCount: number;
pageSize: number;
siblingCount: number;
currentPage: number;
}

View File

@@ -0,0 +1,71 @@
import { useMemo } from 'react';
import { IUsePaginationProps } from './IUsePaginationProps';
export const DOTS = '...';
const range = (start: number, end: number) => {
const length = end - start + 1;
return Array.from({ length }, (_, idx) => idx + start);
};
export const usePagination = ({
totalCount,
pageSize,
siblingCount = 1,
currentPage
}: IUsePaginationProps) => {
const paginationRange = useMemo(() => {
const totalPageCount = Math.ceil(totalCount / pageSize);
// Pages count is determined as siblingCount + firstPage + lastPage + currentPage + 2*DOTS
const totalPageNumbers = siblingCount + 5;
/*
If the number of pages is less than the page numbers we want to show in our
paginationComponent, we return the range [1..totalPageCount]
*/
if (totalPageNumbers >= totalPageCount) {
return range(1, totalPageCount);
}
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
const rightSiblingIndex = Math.min(
currentPage + siblingCount,
totalPageCount
);
/*
We do not want to show dots if there is only one position left
after/before the left/right page count as that would lead to a change if our Pagination
component size which we do not want
*/
const shouldShowLeftDots = leftSiblingIndex > 2;
const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
const firstPageIndex = 1;
const lastPageIndex = totalPageCount;
if (!shouldShowLeftDots && shouldShowRightDots) {
const leftItemCount = 3 + 2 * siblingCount;
const leftRange = range(1, leftItemCount);
return [...leftRange, DOTS, totalPageCount];
}
if (shouldShowLeftDots && !shouldShowRightDots) {
const rightItemCount = 3 + 2 * siblingCount;
const rightRange = range(
totalPageCount - rightItemCount + 1,
totalPageCount
);
return [firstPageIndex, DOTS, ...rightRange];
}
if (shouldShowLeftDots && shouldShowRightDots) {
const middleRange = range(leftSiblingIndex, rightSiblingIndex);
return [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];
}
}, [totalCount, pageSize, siblingCount, currentPage]);
return paginationRange;
};

25
app/src/index.tsx Normal file
View File

@@ -0,0 +1,25 @@
import React from 'react';
import { createRoot, Root } from 'react-dom/client';
import { BrowserRouter as Router } from 'react-router-dom';
import { ApolloClient, InMemoryCache, ApolloProvider, NormalizedCacheObject } from '@apollo/client';
import AppContextProvider from './context/AppContextProvider';
import App from './components/app/App';
const client: ApolloClient<NormalizedCacheObject> = new ApolloClient({
uri: 'http://localhost:8080/v1/graphql',
cache: new InMemoryCache()
});
const container = document.getElementById('app-root') as HTMLElement;
const root: Root = createRoot(container);
root.render(
<React.StrictMode>
<AppContextProvider>
<ApolloProvider client={client}>
<Router>
<App />
</Router>
</ApolloProvider>
</AppContextProvider>
</React.StrictMode>
);

View File

@@ -0,0 +1,8 @@
import { MessageBarType } from '@fluentui/react/lib/MessageBar';
export interface INotification {
messageBarType?: MessageBarType;
message?: string;
isMultiline?: boolean;
isVisible: boolean;
}

6
app/src/models/IVenue.ts Normal file
View File

@@ -0,0 +1,6 @@
export interface IVenue {
active: boolean;
id: number;
link: string;
name: string;
}

19
app/tsconfig.json Normal file
View File

@@ -0,0 +1,19 @@
{
"compilerOptions": {
"baseUrl": ".",
"esModuleInterop": true,
"jsx": "react",
"module": "esnext",
"moduleResolution": "node",
"lib": [
"dom",
"esnext"
],
"strict": true,
"sourceMap": true,
"target": "esnext",
},
"exclude": [
"node_modules"
]
}

39
app/webpack.config.js Normal file
View File

@@ -0,0 +1,39 @@
const prod = process.env.NODE_ENV === 'production';
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
mode: prod ? 'production' : 'development',
entry: './src/index.tsx',
output: {
path: __dirname + '/dist/',
publicPath: '/'
},
module: {
rules: [
{
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json'],
},
use: 'babel-loader',
},
{
test: /\.(s(a|c)ss)$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
}
]
},
devServer: {
historyApiFallback: true
},
devtool: prod ? undefined : 'source-map',
plugins: [
new HtmlWebpackPlugin({
template: 'index.html',
}),
new MiniCssExtractPlugin(),
],
};

5
database/.env Normal file
View File

@@ -0,0 +1,5 @@
POSTGRES_SCHEMAS=flyway
POSTGRES_DB=mlb-game-day
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
ConnectionStrings__DBConnectionString="Host=postgres:5432;Database=${POSTGRES_DB};Username=${POSTGRES_USER};Password=${POSTGRES_PASSWORD}"

View File

@@ -0,0 +1,7 @@
flyway.url=jdbc:postgresql://postgres:5432/mlb-game-day
flyway.locations=filesystem:/flyway/sql
flyway.configFiles=filesystem:/flyway/conf
flyway.user=postgres
flyway.password=postgres
flyway.baselineVersion=0
flyway.baselineOnMigrate=true

View File

@@ -0,0 +1,336 @@
CREATE TABLE IF NOT EXISTS sport (
"id" INT,
"code" TEXT,
"link" TEXT,
"name" TEXT,
"abbreviation" TEXT,
"sortOrder" INT,
"activeStatus" TEXT
);
INSERT INTO sport VALUES
(1,'mlb','/api/v1/sports/1','Major League Baseball','MLB',11,'True'),
(11,'aaa','/api/v1/sports/11','Triple-A','AAA',101,'True'),
(12,'aax','/api/v1/sports/12','Double-A','AA',201,'True'),
(13,'afa','/api/v1/sports/13','High-A','A+',301,'True'),
(14,'afx','/api/v1/sports/14','Single-A','A',401,'True'),
(16,'rok','/api/v1/sports/16','Rookie','ROK',701,'True'),
(17,'win','/api/v1/sports/17','Winter Leagues','WIN',1301,'True'),
(8,'bbl','/api/v1/sports/8','Organized Baseball','Pros',1401,'True'),
(21,'min','/api/v1/sports/21','Minor League Baseball','Minors',1402,'True'),
(23,'ind','/api/v1/sports/23','Independent Leagues','IND',2101,'True'),
(51,'int','/api/v1/sports/51','International Baseball','INT',3501,'True'),
(509,'nae','/api/v1/sports/509','International Baseball (18U)','18U',3503,'True'),
(510,'nas','/api/v1/sports/510','International Baseball (16 and under)','16U',3505,'True'),
(22,'bbc','/api/v1/sports/22','College Baseball','College',5101,'True'),
(586,'hsb','/api/v1/sports/586','High School Baseball','H.S.',6201,'True');
CREATE TABLE IF NOT EXISTS season (
"sportId" INT,
"seasonId" INT,
"hasWildcard" TEXT,
"preSeasonStartDate" TIMESTAMP,
"preSeasonEndDate" TIMESTAMP,
"seasonStartDate" TIMESTAMP,
"springStartDate" TIMESTAMP,
"springEndDate" TIMESTAMP,
"regularSeasonStartDate" TIMESTAMP,
"lastDate1stHalf" TIMESTAMP,
"allStarDate" TIMESTAMP,
"firstDate2ndHalf" TIMESTAMP,
"regularSeasonEndDate" TIMESTAMP,
"postSeasonStartDate" TIMESTAMP,
"postSeasonEndDate" TIMESTAMP,
"seasonEndDate" TIMESTAMP,
"offseasonStartDate" TIMESTAMP,
"offSeasonEndDate" TIMESTAMP,
"seasonLevelGamedayType" TEXT,
"gameLevelGamedayType" TEXT,
"qualifierPlateAppearances" NUMERIC(2, 1),
"qualifierOutsPitched" NUMERIC(5, 1)
);
INSERT INTO season VALUES
(1,2023,'True','2023-01-01 00:00:00','2023-02-23 00:00:00','2023-02-24 00:00:00','2023-02-24 00:00:00','2023-03-28 00:00:00','2023-03-30 00:00:00','2023-07-09 00:00:00','2023-07-11 00:00:00','2023-07-14 00:00:00','2023-10-01 00:00:00','2023-10-03 00:00:00','2023-10-31 00:00:00','2023-10-31 00:00:00','2023-11-01 00:00:00','2023-12-31 00:00:00','P','P',3.1,6000.0),
(11,2023,'False','2023-01-01 00:00:00','2023-03-30 00:00:00','2023-03-31 00:00:00',NULL,NULL,'2023-03-31 00:00:00',NULL,NULL,NULL,'2023-09-24 00:00:00','2023-09-25 00:00:00','2023-10-02 00:00:00','2023-10-02 00:00:00','2023-10-03 00:00:00','2023-12-31 00:00:00','Y','Y',2.7,3000.0),
(12,2023,'False','2023-01-01 00:00:00','2023-04-05 00:00:00','2023-04-06 00:00:00',NULL,NULL,'2023-04-06 00:00:00','2023-06-26 00:00:00',NULL,'2023-06-28 00:00:00','2023-09-17 00:00:00','2023-09-18 00:00:00','2023-09-28 00:00:00','2023-09-28 00:00:00','2023-09-29 00:00:00','2023-12-31 00:00:00','Y','Y',2.7,3000.0),
(13,2023,'False','2022-10-25 00:00:00','2022-10-25 00:00:00','2023-04-06 00:00:00',NULL,NULL,'2023-04-06 00:00:00','2023-06-23 00:00:00',NULL,'2023-06-24 00:00:00','2023-09-10 00:00:00','2023-09-11 00:00:00','2023-09-19 00:00:00','2023-09-19 00:00:00','2023-09-20 00:00:00','2023-12-31 00:00:00','Y','Y',2.7,3000.0),
(14,2023,'False','2023-01-01 00:00:00','2023-04-05 00:00:00','2023-04-06 00:00:00',NULL,NULL,'2023-04-06 00:00:00','2023-06-23 00:00:00',NULL,'2023-06-24 00:00:00','2023-09-10 00:00:00','2023-09-11 00:00:00','2023-09-19 00:00:00','2023-09-19 00:00:00','2023-09-20 00:00:00','2023-12-31 00:00:00','Y','Y',2.7,1500.0),
(16,2023,'True','2023-01-01 00:00:00','2023-06-05 00:00:00','2023-06-06 00:00:00',NULL,NULL,'2023-06-06 00:00:00',NULL,NULL,NULL,'2023-08-23 00:00:00','2023-08-24 00:00:00','2023-08-30 00:00:00','2023-08-30 00:00:00','2023-08-31 00:00:00','2023-12-31 00:00:00','Y','Y',2.7,1500.0),
(17,2023,'True','2023-10-01 00:00:00','2023-10-02 00:00:00','2023-10-03 00:00:00',NULL,NULL,'2023-10-03 00:00:00',NULL,NULL,NULL,'2024-02-10 00:00:00',NULL,NULL,'2024-02-10 00:00:00','2024-02-11 00:00:00','2024-09-30 00:00:00','A','Y',2.7,3300.0),
(21,2023,'False','2023-01-01 00:00:00',NULL,'2023-01-01 00:00:00',NULL,NULL,'2023-01-01 00:00:00',NULL,NULL,NULL,'2023-12-31 00:00:00',NULL,NULL,'2023-12-31 00:00:00',NULL,'2023-12-31 00:00:00','A','A',NULL,NULL),
(23,2023,'True','2023-01-01 00:00:00','2023-04-27 00:00:00','2023-04-28 00:00:00',NULL,NULL,'2023-04-28 00:00:00',NULL,NULL,NULL,'2023-09-17 00:00:00',NULL,NULL,'2023-09-17 00:00:00','2023-10-03 00:00:00','2023-12-31 00:00:00','A','A',2.7,2.4),
(51,2023,'False','2023-01-01 00:00:00','2023-03-06 00:00:00','2023-03-07 00:00:00',NULL,NULL,'2023-03-07 00:00:00',NULL,NULL,NULL,'2023-10-05 00:00:00',NULL,NULL,'2023-10-05 00:00:00','2023-10-06 00:00:00','2023-12-31 00:00:00','Y','Y',NULL,NULL),
(22,2023,'False','2023-01-01 00:00:00','2023-02-10 00:00:00','2023-02-11 00:00:00',NULL,NULL,'2023-02-11 00:00:00',NULL,NULL,NULL,'2023-09-06 00:00:00',NULL,NULL,'2023-09-06 00:00:00','2023-09-07 00:00:00','2023-12-31 00:00:00','Y','Y',2.7,1500.0),
(586,2023,'False','2023-01-01 00:00:00',NULL,'2023-01-01 00:00:00',NULL,NULL,'2023-01-01 00:00:00',NULL,NULL,NULL,'2023-12-31 00:00:00',NULL,NULL,'2023-12-31 00:00:00',NULL,'2023-12-31 00:00:00','N','N',NULL,NULL);
CREATE TABLE IF NOT EXISTS league (
"id" INT,
"name" TEXT,
"link" TEXT,
"abbreviation" TEXT,
"nameShort" TEXT,
"seasonState" TEXT,
"hasWildCard" TEXT,
"hasSplitSeason" TEXT,
"numGames" INT,
"hasPlayoffPoints" TEXT,
"numTeams" INT,
"numWildcardTeams" INT,
"orgCode" TEXT,
"conferencesInUse" TEXT,
"divisionsInUse" TEXT,
"sportId" INT,
"sortOrder" INT,
"active" TEXT
);
INSERT INTO league VALUES
(103,'American League','/api/v1/league/103','AL','American','offseason','True','False',162,'False',15,3,'AL','False','True',1,21,'True'),
(104,'National League','/api/v1/league/104','NL','National','offseason','True','False',162,'False',15,3,'NL','False','True',1,31,'True'),
(114,'Cactus League','/api/v1/league/114','CL','Cactus','offseason','False','False',NULL,'False',NULL,NULL,'CL','False','False',NULL,51,'True'),
(115,'Grapefruit League','/api/v1/league/115','GL','Grapefruit','offseason','False','False',NULL,'False',NULL,NULL,'GL','False','False',NULL,52,'True'),
(100,'American Association','/api/v1/league/100','AA',NULL,'offseason','False','False',NULL,NULL,9,NULL,'AA','False','False',1,2811,'False'),
(105,'Players League','/api/v1/league/105','PL',NULL,'offseason','False','False',NULL,NULL,8,NULL,'PL','False','False',1,2831,'False'),
(101,'Union Association','/api/v1/league/101','UA',NULL,'offseason','False','False',NULL,NULL,12,NULL,'UA','False','False',1,2841,'False'),
(106,'Federal League','/api/v1/league/106','FL',NULL,'offseason','False','False',154,NULL,8,NULL,'FL','False','False',1,2851,'False');
CREATE TABLE IF NOT EXISTS division (
"id" INT,
"name" TEXT,
"season" INT,
"nameShort" TEXT,
"link" TEXT,
"abbreviation" TEXT,
"leagueId" INT,
"sportId" INT,
"hasWildcard" TEXT,
"sortOrder" INT,
"numPlayoffTeams" INT,
"active" TEXT
);
INSERT INTO division VALUES
(205,'National League Central',2022,'NL Central','/api/v1/divisions/205','NLC',104,1,'False',33,1,'True'),
(200,'American League West',2022,'AL West','/api/v1/divisions/200','ALW',103,1,'False',24,1,'True'),
(233,'Pacific Coast League East',2022,'PCL East','/api/v1/divisions/233','PCLE',112,11,'False',122,1,'True'),
(212,'Eastern League Northeast',2022,'EAS Northeast','/api/v1/divisions/212','EASNE',113,12,'False',213,1,'True'),
(201,'American League East',2022,'AL East','/api/v1/divisions/201','ALE',103,1,'False',22,1,'True'),
(204,'National League East',2022,'NL East','/api/v1/divisions/204','NLE',104,1,'False',32,1,'True'),
(202,'American League Central',2022,'AL Central','/api/v1/divisions/202','ALC',103,1,'False',23,1,'True'),
(241,'Texas League North',2022,'TEX North','/api/v1/divisions/241','TEXN',109,12,'False',233,1,'True'),
(239,'Southern League North',2022,'SOU North','/api/v1/divisions/239','SOUN',111,12,'False',223,1,'True'),
(203,'National League West',2022,'NL West','/api/v1/divisions/203','NLW',104,1,'False',34,1,'True'),
(219,'International League East',2022,'INT East','/api/v1/divisions/219','INTE',117,11,'False',112,1,'True'),
(222,'Mexican League Norte',2022,'MEX Norte','/api/v1/divisions/222','MEXN',125,23,'False',2127,5,'True'),
(223,'Mexican League Sur',2022,'MEX Sur','/api/v1/divisions/223','MEXS',125,23,'False',2128,5,'True'),
(221,'International League West',2022,'INT West','/api/v1/divisions/221','INTW',117,11,'False',114,1,'True'),
(231,'Pacific Coast League West',2022,'PCL West','/api/v1/divisions/231','PCLW',112,11,'False',123,1,'True'),
(213,'Eastern League Southwest',2022,'EAS Southwest','/api/v1/divisions/213','EASSW',113,12,'False',215,1,'True'),
(240,'Southern League South',2022,'SOU South','/api/v1/divisions/240','SOUS',111,12,'False',225,1,'True'),
(242,'Texas League South',2022,'TEX South','/api/v1/divisions/242','TEXS',109,12,'False',235,1,'True'),
(208,'California League North',2022,'CAL North','/api/v1/divisions/208','CALN',110,14,'False',433,1,'True'),
(224,'Midwest League East',2022,'MID East','/api/v1/divisions/224','MIDE',118,13,'False',323,1,'True'),
(237,'South Atlantic League North',2022,'SAL North','/api/v1/divisions/237','SALN',116,13,'False',313,1,'True'),
(214,'Florida State League East',2022,'FSL East','/api/v1/divisions/214','FSLE',123,14,'False',423,1,'True'),
(209,'California League South',2022,'CAL South','/api/v1/divisions/209','CALS',110,14,'False',435,1,'True'),
(215,'Florida State League West',2022,'FSL West','/api/v1/divisions/215','FSLW',123,14,'False',425,1,'True'),
(225,'Midwest League West',2022,'MID West','/api/v1/divisions/225','MIDW',118,13,'False',325,1,'True'),
(238,'South Atlantic League South',2022,'SAL South','/api/v1/divisions/238','SALS',116,13,'False',315,1,'True'),
(210,'Carolina League North',2022,'CAR North','/api/v1/divisions/210','CARN',122,14,'False',413,1,'True'),
(247,'Dominican Summer League North',2022,'DSL North','/api/v1/divisions/247','DSLN',130,16,'False',732,1,'True'),
(211,'Carolina League South',2022,'CAR South','/api/v1/divisions/211','CARS',122,14,'False',417,1,'True'),
(316,'WBC Qualifier 1',2022,'WBC Qualifier 1','/api/v1/divisions/316','WBC Q1',159,51,'False',3619,NULL,'True'),
(317,'WBC Qualifier 2',2022,'WBC Qualifier 2','/api/v1/divisions/317','WBC Q2',159,51,'False',3620,NULL,'True'),
(310,'Pool A',2021,'Pool A','/api/v1/divisions/310','Pool A',160,51,'False',3612,NULL,'True'),
(311,'Pool B',2021,'Pool B','/api/v1/divisions/311','Pool B',160,51,'False',3613,NULL,'True'),
(312,'Pool C',2021,'Pool C','/api/v1/divisions/312','Pool C',160,51,'False',3614,NULL,'True'),
(313,'Pool D',2021,'Pool D','/api/v1/divisions/313','Pool D',160,51,'False',3615,NULL,'True'),
(314,'Asia Quarterfinals',2021,'Asia Quarterfinals','/api/v1/divisions/314','AQ',160,51,'False',3617,2,'True'),
(315,'North America Quarterfinals',2021,'N.A. Quarterfinals','/api/v1/divisions/315','NAQ',160,51,'False',3618,2,'True'),
(217,'Florida Complex League North',2022,'FCL North','/api/v1/divisions/217','FCLN',124,16,'False',725,1,'True'),
(248,'Dominican Summer League South',2022,'DSL South','/api/v1/divisions/248','DSLS',130,16,'False',733,1,'True'),
(216,'Florida Complex League East',2022,'FCL East','/api/v1/divisions/216','FCLE',124,16,'False',723,1,'True'),
(249,'Dominican Summer League Northwest',2022,'DSL Northwest','/api/v1/divisions/249','DSLNW',130,16,'False',735,1,'True'),
(218,'Florida Complex League South',2022,'FCL South','/api/v1/divisions/218','FCLS',124,16,'False',729,1,'True'),
(250,'Dominican Summer League Baseball City',2022,'DSL Baseball City','/api/v1/divisions/250','DSLBC',130,16,'False',736,1,'True'),
(246,'Dominican Summer League San Pedro',2022,'DSL San Pedro','/api/v1/divisions/246','DSLSP',130,16,'False',737,1,'True'),
(401,'Dominican Summer League Northeast',2022,'DSL Northeast','/api/v1/divisions/401','DSLNE',130,16,'False',734,1,'True'),
(251,'Arizona Fall League East',2021,'AFL East','/api/v1/divisions/251','AFLE',119,17,'False',1312,1,'True'),
(252,'Arizona Fall League West',2021,'AFL West','/api/v1/divisions/252','AFLW',119,17,'False',1313,1,'True'),
(560,'Arizona Complex League East',2022,'ACL East','/api/v1/divisions/560','ACLE',121,16,'False',713,1,'True'),
(561,'Arizona Complex League West',2022,'ACL West','/api/v1/divisions/561','ACLW',121,16,'False',717,1,'True'),
(410,'LVBP Central Division',2020,'LVBP Oriental','/api/v1/divisions/410','ORI',135,17,'False',1336,2,'True'),
(411,'LVBP Occidental Division',2020,'LVBP Occidental','/api/v1/divisions/411','OCC',135,17,'False',1339,2,'True'),
(5418,'Australian Baseball League Northeast',2022,'Australian Lg. NE','/api/v1/divisions/5418','ABL NE',595,17,'False',1362,2,'True'),
(5419,'Australian Baseball League Southwest',2022,'Australian Lg. SW','/api/v1/divisions/5419','ABL SW',595,17,'False',1363,2,'True'),
(570,'Arizona Complex League Central',2022,'ACL Central','/api/v1/divisions/570','ACLC',121,16,'False',715,1,'True'),
(5436,'South Division',2022,'South','/api/v1/divisions/5436','ALPBS',436,23,'False',2123,1,'True'),
(5437,'North Division',2022,'North','/api/v1/divisions/5437','ALPBN',436,23,'False',2122,1,'True');
CREATE TABLE IF NOT EXISTS venue (
"id" INT,
"name" TEXT,
"link" TEXT,
"active" TEXT
);
INSERT INTO venue VALUES
(1,'Angel Stadium','/api/v1/venues/1','True'),
(2,'Oriole Park at Camden Yards','/api/v1/venues/2','True'),
(3,'Fenway Park','/api/v1/venues/3','True'),
(5380,'CoolToday Park','/api/v1/venues/5380','True'),
(4,'Guaranteed Rate Field','/api/v1/venues/4','True'),
(5,'Progressive Field','/api/v1/venues/5','True'),
(7,'Kauffman Stadium','/api/v1/venues/7','True'),
(5000,'The Ballpark of the Palm Beaches','/api/v1/venues/5000','True'),
(10,'Oakland Coliseum','/api/v1/venues/10','True'),
(12,'Tropicana Field','/api/v1/venues/12','True'),
(2700,'BayCare Ballpark','/api/v1/venues/2700','True'),
(14,'Rogers Centre','/api/v1/venues/14','True'),
(15,'Chase Field','/api/v1/venues/15','True'),
(17,'Wrigley Field','/api/v1/venues/17','True'),
(19,'Coors Field','/api/v1/venues/19','True'),
(4629,'Sloan Park','/api/v1/venues/4629','True'),
(22,'Dodger Stadium','/api/v1/venues/22','True'),
(4249,'Salt River Fields at Talking Stick','/api/v1/venues/4249','True'),
(31,'PNC Park','/api/v1/venues/31','True'),
(32,'American Family Field','/api/v1/venues/32','True'),
(2856,'Clover Park','/api/v1/venues/2856','True'),
(680,'T-Mobile Park','/api/v1/venues/680','True'),
(2602,'Great American Ball Park','/api/v1/venues/2602','True'),
(2603,'Surprise Stadium','/api/v1/venues/2603','True'),
(2862,'Hammond Stadium','/api/v1/venues/2862','True'),
(2735,'Muncy Bank Ballpark','/api/v1/venues/2735','True'),
(2500,'Tempe Diablo Stadium','/api/v1/venues/2500','True'),
(5445,'Field of Dreams','/api/v1/venues/5445','True'),
(4169,'loanDepot park','/api/v1/venues/4169','True'),
(2889,'Busch Stadium','/api/v1/venues/2889','True'),
(2507,'Hohokam Stadium','/api/v1/venues/2507','True'),
(2508,'Ed Smith Stadium','/api/v1/venues/2508','True'),
(5325,'Globe Life Field','/api/v1/venues/5325','True'),
(2511,'Publix Field at Joker Marchant Stadium','/api/v1/venues/2511','True'),
(4309,'JetBlue Park','/api/v1/venues/4309','True'),
(2518,'American Family Fields of Phoenix','/api/v1/venues/2518','True'),
(2520,'Roger Dean Chevrolet Stadium','/api/v1/venues/2520','True'),
(2392,'Minute Maid Park','/api/v1/venues/2392','True'),
(3289,'Citi Field','/api/v1/venues/3289','True'),
(2394,'Comerica Park','/api/v1/venues/2394','True'),
(2523,'George M. Steinbrenner Field','/api/v1/venues/2523','True'),
(2395,'Oracle Park','/api/v1/venues/2395','True'),
(2526,'LECOM Park','/api/v1/venues/2526','True'),
(3809,'Camelback Ranch','/api/v1/venues/3809','True'),
(4705,'Truist Park','/api/v1/venues/4705','True'),
(2530,'Peoria Stadium','/api/v1/venues/2530','True'),
(2532,'Scottsdale Stadium','/api/v1/venues/2532','True'),
(2534,'Charlotte Sports Park','/api/v1/venues/2534','True'),
(2536,'TD Ballpark','/api/v1/venues/2536','True'),
(3309,'Nationals Park','/api/v1/venues/3309','True'),
(3312,'Target Field','/api/v1/venues/3312','True'),
(3313,'Yankee Stadium','/api/v1/venues/3313','True'),
(2680,'Petco Park','/api/v1/venues/2680','True'),
(2681,'Citizens Bank Park','/api/v1/venues/2681','True'),
(3834,'Goodyear Ballpark','/api/v1/venues/3834','True');
CREATE TABLE IF NOT EXISTS team (
"springLeagueId" INT,
"allStarStatus" TEXT,
"id" INT,
"name" TEXT,
"link" TEXT,
"season" INT,
"venueId" INT,
"springVenueId" INT,
"teamCode" TEXT,
"fileCode" TEXT,
"abbreviation" TEXT,
"teamName" TEXT,
"locationName" TEXT,
"firstYearOfPlay" INT,
"leagueId" INT,
"divisionId" INT,
"sportId" INT,
"shortName" TEXT,
"franchiseName" TEXT,
"clubName" TEXT,
"active" TEXT,
"venue" INT,
"springVenue" INT
);
INSERT INTO team VALUES
(114,'N',133,'Oakland Athletics','/api/v1/teams/133',2022,10,2507,'oak','oak','OAK','Athletics','Oakland',1901,103,200,1,'Oakland','Oakland','Athletics','True',NULL,NULL),
(115,'N',134,'Pittsburgh Pirates','/api/v1/teams/134',2022,31,2526,'pit','pit','PIT','Pirates','Pittsburgh',1882,104,205,1,'Pittsburgh','Pittsburgh','Pirates','True',NULL,NULL),
(114,'N',135,'San Diego Padres','/api/v1/teams/135',2022,2680,2530,'sdn','sd','SD','Padres','San Diego',1968,104,2,1,'San Diego','San Diego','Padres','True',NULL,NULL),
(114,'N',136,'Seattle Mariners','/api/v1/teams/136',2022,680,2530,'sea','sea','SEA','Mariners','Seattle',1977,103,200,1,'Seattle','Seattle','Mariners','True',NULL,NULL),
(114,'N',137,'San Francisco Giants','/api/v1/teams/137',2022,2395,2532,'sfn','sf','SF','Giants','San Francisco',1883,104,203,1,'San Francisco','San Francisco','Giants','True',NULL,NULL),
(115,'N',138,'St. Louis Cardinals','/api/v1/teams/138',2022,NULL,NULL,'sln','stl','STL','Cardinals','St. Louis',1892,104,205,1,'St. Louis','St. Louis','Cardinals','True',2889,2520),
(115,'N',139,'Tampa Bay Rays','/api/v1/teams/139',2022,12,2534,'tba','tb','TB','Rays','St. Petersburg',1996,103,201,1,'Tampa Bay','Tampa Bay','Rays','True',NULL,NULL),
(114,'N',140,'Texas Rangers','/api/v1/teams/140',2022,5325,2603,'tex','tex','TEX','Rangers','Arlington',1961,103,200,1,'Texas','Texas','Rangers','True',NULL,NULL),
(115,'N',141,'Toronto Blue Jays','/api/v1/teams/141',2022,14,2536,'tor','tor','TOR','Blue Jays','Toronto',1977,103,201,1,'Toronto','Toronto','Blue Jays','True',NULL,NULL),
(115,'N',142,'Minnesota Twins','/api/v1/teams/142',2022,3312,2862,'min','min','MIN','Twins','Minneapolis',1901,103,202,1,'Minnesota','Minnesota','Twins','True',NULL,NULL),
(115,'N',143,'Philadelphia Phillies','/api/v1/teams/143',2022,2681,2700,'phi','phi','PHI','Phillies','Philadelphia',1883,104,204,1,'Philadelphia','Philadelphia','Phillies','True',NULL,NULL),
(115,'N',144,'Atlanta Braves','/api/v1/teams/144',2022,4705,5380,'atl','atl','ATL','Braves','Atlanta',1871,104,204,1,'Atlanta','Atlanta','Braves','True',NULL,NULL),
(114,'N',145,'Chicago White Sox','/api/v1/teams/145',2022,4,3809,'cha','cws','CWS','White Sox','Chicago',1901,103,202,1,'Chi White Sox','Chicago','White Sox','True',NULL,NULL),
(115,'N',146,'Miami Marlins','/api/v1/teams/146',2022,4169,2520,'mia','mia','MIA','Marlins','Miami',1991,104,204,1,'Miami','Miami','Marlins','True',NULL,NULL),
(115,'N',147,'New York Yankees','/api/v1/teams/147',2022,3313,2523,'nya','nyy','NYY','Yankees','Bronx',1903,103,201,1,'NY Yankees','New York','Yankees','True',NULL,NULL),
(114,'N',158,'Milwaukee Brewers','/api/v1/teams/158',2022,32,2518,'mil','mil','MIL','Brewers','Milwaukee',1968,104,205,1,'Milwaukee','Milwaukee','Brewers','True',NULL,NULL),
(114,'N',108,'Los Angeles Angels','/api/v1/teams/108',2022,1,2500,'ana','ana','LAA','Angels','Anaheim',1961,103,200,1,'LA Angels','Los Angeles','Angels','True',NULL,NULL),
(114,'N',109,'Arizona Diamondbacks','/api/v1/teams/109',2022,15,4249,'ari','ari','AZ','D-backs','Phoenix',1996,104,203,1,'Arizona','Arizona','Diamondbacks','True',NULL,NULL),
(115,'N',110,'Baltimore Orioles','/api/v1/teams/110',2022,2,2508,'bal','bal','BAL','Orioles','Baltimore',1901,103,201,1,'Baltimore','Baltimore','Orioles','True',NULL,NULL),
(115,'N',111,'Boston Red Sox','/api/v1/teams/111',2022,3,4309,'bos','bos','BOS','Red Sox','Boston',1901,103,201,1,'Boston','Boston','Red Sox','True',NULL,NULL),
(114,'N',112,'Chicago Cubs','/api/v1/teams/112',2022,17,4629,'chn','chc','CHC','Cubs','Chicago',1874,104,205,1,'Chi Cubs','Chicago','Cubs','True',NULL,NULL),
(114,'N',113,'Cincinnati Reds','/api/v1/teams/113',2022,2602,3834,'cin','cin','CIN','Reds','Cincinnati',1882,104,205,1,'Cincinnati','Cincinnati','Reds','True',NULL,NULL),
(114,'N',114,'Cleveland Guardians','/api/v1/teams/114',2022,5,3834,'cle','cle','CLE','Guardians','Cleveland',1901,103,202,1,'Cleveland','Cleveland','Guardians','True',NULL,NULL),
(114,'N',115,'Colorado Rockies','/api/v1/teams/115',2022,19,4249,'col','col','COL','Rockies','Denver',1992,104,203,1,'Colorado','Colorado','Rockies','True',NULL,NULL),
(115,'N',116,'Detroit Tigers','/api/v1/teams/116',2022,2394,2511,'det','det','DET','Tigers','Detroit',1901,103,202,1,'Detroit','Detroit','Tigers','True',NULL,NULL),
(115,'N',117,'Houston Astros','/api/v1/teams/117',2022,2392,5000,'hou','hou','HOU','Astros','Houston',1962,103,200,1,'Houston','Houston','Astros','True',NULL,NULL),
(114,'N',118,'Kansas City Royals','/api/v1/teams/118',2022,7,2603,'kca','kc','KC','Royals','Kansas City',1968,103,202,1,'Kansas City','Kansas City','Royals','True',NULL,NULL),
(114,'N',119,'Los Angeles Dodgers','/api/v1/teams/119',2022,22,3809,'lan','la','LAD','Dodgers','Los Angeles',1884,104,203,1,'LA Dodgers','Los Angeles','Dodgers','True',NULL,NULL),
(115,'N',120,'Washington Nationals','/api/v1/teams/120',2022,3309,5000,'was','was','WSH','Nationals','Washington',1968,104,204,1,'Washington','Washington','Nationals','True',NULL,NULL),
(115,'N',121,'New York Mets','/api/v1/teams/121',2022,3289,2856,'nyn','nym','NYM','Mets','Flushing',1962,104,204,1,'NY Mets','New York','Mets','True',NULL,NULL);
CREATE TABLE IF NOT EXISTS game (
"gamePk" INT,
"link" TEXT,
"gameType" TEXT,
"season" INT,
"gameDate" TEXT,
"officialDate" TIMESTAMP,
"status_abstractGameState" TEXT,
"status_codedGameState" TEXT,
"status_detailedState" TEXT,
"status_statusCode" TEXT,
"status_startTimeTBD" TEXT,
"status_abstractGameCode" TEXT,
"teams_away_leagueRecord_wins" INT,
"teams_away_leagueRecord_losses" INT,
"teams_away_leagueRecord_pct" NUMERIC(3, 3),
"teams_away_score" INT,
"teams_away_teamId" INT,
"teams_away_isWinner" TEXT,
"teams_away_splitSquad" TEXT,
"teams_away_seriesNumber" INT,
"teams_home_leagueRecord_wins" INT,
"teams_home_leagueRecord_losses" INT,
"teams_home_leagueRecord_pct" NUMERIC(3, 3),
"teams_home_score" INT,
"teams_home_teamId" INT,
"teams_home_isWinner" TEXT,
"teams_home_splitSquad" TEXT,
"teams_home_seriesNumber" INT,
"venueId" INT,
"content_link" TEXT,
"isTie" TEXT,
"gameNumber" INT,
"publicFacing" TEXT,
"doubleHeader" TEXT,
"gamedayType" TEXT,
"tiebreaker" TEXT,
"calendarEventID" TEXT,
"seasonDisplay" INT,
"dayNight" TEXT,
"scheduledInnings" INT,
"reverseHomeAwayStatus" TEXT,
"inningBreakLength" INT,
"gamesInSeries" INT,
"seriesGameNumber" INT,
"seriesDescription" TEXT,
"recordSource" TEXT,
"ifNecessary" TEXT,
"ifNecessaryDescription" TEXT
);

71
docker-compose.yml Normal file
View File

@@ -0,0 +1,71 @@
version: "3.8"
services:
postgres:
container_name: postgres
image: postgres:11
restart: always
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
env_file:
- ./database/.env
networks:
- mlbgameday
flyway:
container_name: flyway
image: flyway/flyway:9.2.1
command: -connectRetries=60 migrate
volumes:
- ./database/sql:/flyway/sql
- ./database/conf:/flyway/conf
env_file:
- ./database/.env
networks:
- mlbgameday
depends_on:
- postgres
venues:
container_name: venues
build:
context: ./venues
dockerfile: Dockerfile
ports:
- "5510:80"
env_file:
- ./database/.env
restart: on-failure
networks:
- mlbgameday
depends_on:
- postgres
hasura:
container_name: hasura
image: hasura/graphql-engine:v2.16.1.cli-migrations-v3
ports:
- "8080:8080"
depends_on:
- postgres
- venues
restart: on-failure
environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_METADATA_DIR: /hasura-metadata
volumes:
- ./hasura/metadata:/hasura-metadata
networks:
- mlbgameday
volumes:
db_data:
networks:
mlbgameday:
driver: bridge

6
hasura/config.yaml Normal file
View File

@@ -0,0 +1,6 @@
version: 3
endpoint: http://localhost:8080
metadata_directory: metadata
actions:
kind: synchronous
handler_webhook_baseurl: http://localhost:3000

View File

@@ -0,0 +1,54 @@
type Query {
venueById(
id: Int!
): VenueByIdResponse
}
type Query {
venues(
pageNumber: Int
pageSize: Int
): VenuesPagedResponse
}
input SampleInput {
username: String!
password: String!
}
type SampleOutput {
accessToken: String!
}
type Venue {
active: String
id: Int
link: String
name: String
}
type VenuesPagedResponse {
currentPage: Int
errors: String
message: String
pageSize: Int
results: [Venue]
succeeded: Boolean
totalItemCount: Int
totalPageCount: Int
}
type VenueResponse {
errors: String
message: String
results: Venue
succeeded: Boolean
}
type VenueByIdResponse {
errors: String
message: String
results: Venue
succeeded: Boolean
}

View File

@@ -0,0 +1,42 @@
actions:
- name: venueById
definition:
kind: ""
handler: http://venues
request_transform:
method: GET
query_params: {}
request_headers:
add_headers: {}
remove_headers:
- content-type
template_engine: Kriti
url: '{{$base_url}}/api/venues/{{$body.input.id}}'
version: 2
- name: venues
definition:
kind: ""
handler: http://venues
request_transform:
method: GET
query_params:
pageNumber: '{{$body.input.pageNumber}}'
pageSize: '{{$body.input.pageSize}}'
request_headers:
add_headers: {}
remove_headers:
- content-type
template_engine: Kriti
url: '{{$base_url}}/api/venues'
version: 2
custom_types:
enums: []
input_objects:
- name: SampleInput
objects:
- name: SampleOutput
- name: Venue
- name: VenuesPagedResponse
- name: VenueResponse
- name: VenueByIdResponse
scalars: []

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
disabled_for_roles: []

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1 @@
version: 3

25
venues/.dockerignore Normal file
View File

@@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

405
venues/.gitignore vendored Normal file
View File

@@ -0,0 +1,405 @@
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# content below from: https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using Microsoft.AspNetCore.Mvc;
using Venues.Entities;
using Venues.Filter;
using Venues.Models;
using Venues.Services;
using Venues.Wrappers;
namespace Venues.Controllers
{
[ApiController]
[Route("api/venues")]
public class VenuesController : ControllerBase
{
private readonly IVenuesRepository _venuesRepository;
private readonly IMapper _mapper;
const int maxVenuesPerPage = 50;
public VenuesController(IVenuesRepository venuesRepository, IMapper mapper)
{
_venuesRepository = venuesRepository ?? throw new ArgumentNullException(nameof(venuesRepository));
_mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
}
[HttpGet]
public async Task<ActionResult<IEnumerable<VenueDto>>> GetVenues([FromQuery] PaginationFilter filter)
{
if (filter.PageSize > maxVenuesPerPage)
{
filter.PageSize = maxVenuesPerPage;
}
var (venueEntities, paginationMetadata) = await _venuesRepository.GetVenuesAsync(filter.PageNumber, filter.PageSize);
return Ok(new PagedResponse<IEnumerable<VenueDto>>(_mapper.Map<IEnumerable<VenueDto>>(venueEntities), paginationMetadata));
}
[HttpGet("{id}")]
public async Task<ActionResult<VenueDto>> GetVenue(int id)
{
var venue = await _venuesRepository.GetVenueAsync(id);
if (venue == null)
{
return NotFound();
}
return Ok(new Response<VenueDto>(_mapper.Map<VenueDto>(venue)));
}
}
}

View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Venues.Entities;
namespace Venues.DbContexts
{
public partial class MlbGameDayContext : DbContext
{
public MlbGameDayContext()
{
}
public MlbGameDayContext(DbContextOptions<MlbGameDayContext> options)
: base(options)
{
}
public virtual DbSet<Venue> Venues { get; set; } = null!;
//protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
//{
// if (!optionsBuilder.IsConfigured)
// {
// optionsBuilder.UseNpgsql("Host=localhost;Database=mlb-game-day;Username=postgres;Password=postgres");
// }
//}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Venue>(entity =>
{
entity.HasNoKey();
entity.ToTable("venue");
entity.Property(e => e.Active).HasColumnName("active");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Link).HasColumnName("link");
entity.Property(e => e.Name).HasColumnName("name");
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
}

22
venues/Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Venues.csproj", "."]
RUN dotnet restore "./Venues.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "Venues.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Venues.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Venues.dll"]

13
venues/Entities/Venue.cs Normal file
View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace Venues.Entities
{
public partial class Venue
{
public int? Id { get; set; }
public string? Name { get; set; }
public string? Link { get; set; }
public string? Active { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System;
namespace Venues.Filter
{
public class PaginationFilter
{
public int PageNumber { get; set; }
public int PageSize { get; set; }
public PaginationFilter()
{
this.PageNumber = 1;
this.PageSize = 10;
}
public PaginationFilter(int pageNumber, int pageSize)
{
this.PageNumber = pageNumber < 1 ? 1 : pageNumber;
this.PageSize = pageSize > 10 ? 10 : pageSize;
}
}
}

12
venues/Models/VenueDto.cs Normal file
View File

@@ -0,0 +1,12 @@
using System;
namespace Venues.Models
{
public class VenueDto
{
public int Id { get; set; }
public string Name { get; set; }
public string Link { get; set; }
public string Active { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
using AutoMapper;
namespace Venues.Profiles
{
public class VenueProfile : Profile
{
public VenueProfile()
{
CreateMap<Entities.Venue, Models.VenueDto>();
}
}
}

56
venues/Program.cs Normal file
View File

@@ -0,0 +1,56 @@
using Microsoft.EntityFrameworkCore;
using Serilog;
using Venues;
using Venues.DbContexts;
using Venues.Services;
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Console()
.WriteTo.File("logs/venues.txt", rollingInterval: RollingInterval.Day)
.CreateLogger();
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseSerilog();
// Add services to the container.
builder.Services.AddControllers(options =>
{
options.ReturnHttpNotAcceptable = true;
}).AddXmlDataContractSerializerFormatters();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddDbContext<MlbGameDayContext>(dbContextOptions =>
dbContextOptions.UseNpgsql(builder.Configuration["ConnectionStrings:DBConnectionString"])
);
builder.Services.AddScoped<IVenuesRepository, VenuesRepository>();
builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
app.Run();

View File

@@ -0,0 +1,30 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:6222",
"sslPort": 44367
}
},
"profiles": {
"Venues": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7510;http://localhost:5510",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -0,0 +1,11 @@
using Venues.Entities;
namespace Venues.Services
{
public interface IVenuesRepository
{
Task<(IEnumerable<Venue>, PaginationMetadata)> GetVenuesAsync(int pageNumber, int pageSize);
Task<Venue?> GetVenueAsync(int venueId);
}
}

View File

@@ -0,0 +1,20 @@
using System;
namespace Venues.Services
{
public class PaginationMetadata
{
public int TotalItemCount { get; set; }
public int TotalPageCount { get; set; }
public int PageSize { get; set; }
public int CurrentPage { get; set; }
public PaginationMetadata(int totalItemCount, int pageSize, int currentPage)
{
TotalItemCount = totalItemCount;
PageSize = pageSize;
CurrentPage = currentPage;
TotalPageCount = (int)Math.Ceiling(totalItemCount / (double)pageSize);
}
}
}

View File

@@ -0,0 +1,36 @@
using System;
using Microsoft.EntityFrameworkCore;
using Venues.DbContexts;
using Venues.Entities;
namespace Venues.Services
{
public class VenuesRepository : IVenuesRepository
{
private readonly MlbGameDayContext _context;
public VenuesRepository(MlbGameDayContext context)
{
_context = context ?? throw new ArgumentNullException(nameof(context));
}
public async Task<Venue?> GetVenueAsync(int venueId)
{
return await _context.Venues.Where(v => v.Id == venueId).FirstOrDefaultAsync();
}
public async Task<(IEnumerable<Venue>, PaginationMetadata)> GetVenuesAsync(int pageNumber, int pageSize)
{
var collection = _context.Venues as IQueryable<Venue>;
var totalItemCount = await collection.CountAsync();
var paginationMetadata = new PaginationMetadata(totalItemCount, pageSize, pageNumber);
var collectionToReturn = await collection.OrderBy(v => v.Name)
.Skip(pageSize * (pageNumber -1))
.Take(pageSize)
.ToListAsync();
return (collectionToReturn, paginationMetadata);
}
}
}

50
venues/Venues.csproj Normal file
View File

@@ -0,0 +1,50 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>docker-compose.dcproj</DockerComposeProjectPath>
<UserSecretsId>d38d20dc-1ee5-4470-be2f-b7be9db4d899</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.12">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
</ItemGroup>
<ItemGroup>
<None Remove="Controllers\" />
<None Remove="Models\" />
<None Remove="Serilog.AspNetCore" />
<None Remove="Serilog.Sinks.File" />
<None Remove="Serilog.Sinks.Console" />
<None Remove="Npgsql.EntityFrameworkCore.PostgreSQL" />
<None Remove="Microsoft.EntityFrameworkCore.Tools" />
<None Remove="Entities\" />
<None Remove="DbContexts\" />
<None Remove="Services\" />
<None Remove="AutoMapper.Extensions.Microsoft.DependencyInjection" />
<None Remove="Profiles\" />
<None Remove="Wrappers\" />
<None Remove="Filter\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
<Folder Include="Models\" />
<Folder Include="Entities\" />
<Folder Include="DbContexts\" />
<Folder Include="Services\" />
<Folder Include="Profiles\" />
<Folder Include="Wrappers\" />
<Folder Include="Filter\" />
</ItemGroup>
</Project>

31
venues/Venues.sln Normal file
View File

@@ -0,0 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 25.0.1704.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Venues", "Venues.csproj", "{3BB810B0-C2EF-4B75-B176-314E08FFF578}"
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{E3E56705-2657-4364-A57D-BC417E0EE8A9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3BB810B0-C2EF-4B75-B176-314E08FFF578}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3BB810B0-C2EF-4B75-B176-314E08FFF578}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3BB810B0-C2EF-4B75-B176-314E08FFF578}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3BB810B0-C2EF-4B75-B176-314E08FFF578}.Release|Any CPU.Build.0 = Release|Any CPU
{E3E56705-2657-4364-A57D-BC417E0EE8A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3E56705-2657-4364-A57D-BC417E0EE8A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3E56705-2657-4364-A57D-BC417E0EE8A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3E56705-2657-4364-A57D-BC417E0EE8A9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {866A8BAC-A584-4E59-926D-94E2A1A8A4F9}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,27 @@
using System;
using Venues.Services;
namespace Venues.Wrappers
{
public class PagedResponse<T>: Response<T>
{
public int TotalItemCount { get; set; }
public int TotalPageCount { get; set; }
public int PageSize { get; set; }
public int CurrentPage { get; set; }
public PagedResponse(T results, PaginationMetadata paginationMetadata)
{
this.TotalItemCount = paginationMetadata.TotalItemCount;
this.TotalPageCount = paginationMetadata.TotalPageCount;
this.CurrentPage = paginationMetadata.CurrentPage;
this.PageSize = paginationMetadata.PageSize;
this.CurrentPage = paginationMetadata.CurrentPage;
this.Results = results;
this.Message = null;
this.Succeeded = true;
this.Errors = null;
}
}
}

View File

@@ -0,0 +1,26 @@
using System;
namespace Venues.Wrappers
{
public class Response<T>
{
public T Results { get; set; }
public bool Succeeded { get; set; }
public string[] Errors { get; set; }
public string Message { get; set; }
public Response()
{
}
public Response(T results)
{
Succeeded = true;
Message = string.Empty;
Errors = null;
Results = results;
}
}
}

View File

@@ -0,0 +1,13 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DBConnectionString": "Host=localhost;Database=mlb-game-day;Username=postgres;Password=postgres"
}
}

View File

@@ -0,0 +1,11 @@
{
"ConnectionStrings": {
"DefaultConnection": "DataSource=app.db"
},
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*"
}

10
venues/appsettings.json Normal file
View File

@@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk" DefaultTargets="Build">
<PropertyGroup Label="Globals">
<ProjectVersion>2.1</ProjectVersion>
<DockerTargetOS>Linux</DockerTargetOS>
<ProjectGuid>{E3E56705-2657-4364-A57D-BC417E0EE8A9}</ProjectGuid>
<DockerLaunchBrowser>True</DockerLaunchBrowser>
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}/swagger</DockerServiceUrl>
<DockerServiceName>venues</DockerServiceName>
</PropertyGroup>
<ItemGroup>
<None Include="docker-compose.override.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
<None Include="docker-compose.yml" />
<None Include=".dockerignore" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
version: '3.4'
services:
venues:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:443;http://+:80
ports:
- "80"
- "443"
volumes:
- ~/.aspnet/https:/root/.aspnet/https:ro
- ~/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro

View File

@@ -0,0 +1,8 @@
version: '3.4'
services:
venues:
image: ${DOCKER_REGISTRY-}venues
build:
context: .
dockerfile: ./Dockerfile

View File

@@ -0,0 +1,35 @@
2022-12-31 11:26:01.898 -06:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"]
2022-12-31 11:26:01.958 -06:00 [DBG] Hosting starting
2022-12-31 11:26:02.064 -06:00 [DBG] Using development certificate: CN=localhost (Thumbprint: D1AC045DA5B402C2D2761887E1B189C128A0E6AE)
2022-12-31 11:26:02.230 -06:00 [INF] Now listening on: https://localhost:7103
2022-12-31 11:26:02.230 -06:00 [INF] Now listening on: http://localhost:5106
2022-12-31 11:26:02.230 -06:00 [DBG] Loaded hosting startup assembly Venues
2022-12-31 11:26:02.230 -06:00 [INF] Application started. Press Ctrl+C to shut down.
2022-12-31 11:26:02.230 -06:00 [INF] Hosting environment: Development
2022-12-31 11:26:02.230 -06:00 [INF] Content root path: /Users/noahspannbauer/Developer/Work/mlb-game-day/Venues/
2022-12-31 11:26:02.230 -06:00 [DBG] Hosting started
2022-12-31 11:26:02.241 -06:00 [DBG] Connection id "0HMNBAGBGBQU1" accepted.
2022-12-31 11:26:02.242 -06:00 [DBG] Connection id "0HMNBAGBGBQU1" started.
2022-12-31 11:26:03.124 -06:00 [DBG] Connection id "0HMNBAGBGBQU1" received FIN.
2022-12-31 11:26:03.131 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2022-12-31 11:26:03.164 -06:00 [DBG] Connection id "0HMNBAGBGBQU1" stopped.
2022-12-31 11:26:03.168 -06:00 [DBG] Connection id "0HMNBAGBGBQU1" sending FIN because: "The Socket transport's send loop completed gracefully."
2022-12-31 11:26:03.181 -06:00 [DBG] Connection id "0HMNBAGBGBQU2" accepted.
2022-12-31 11:26:03.181 -06:00 [DBG] Connection id "0HMNBAGBGBQU2" started.
2022-12-31 11:26:03.236 -06:00 [DBG] Connection 0HMNBAGBGBQU2 established using the following protocol: "Tls12"
2022-12-31 11:26:03.282 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/index.html - -
2022-12-31 11:26:03.283 -06:00 [DBG] Wildcard detected, all requests with hosts will be allowed.
2022-12-31 11:26:03.335 -06:00 [DBG] Connection id "0HMNBAGBGBQU2" completed keep alive response.
2022-12-31 11:26:03.336 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/index.html - - - 200 - text/html;charset=utf-8 55.8462ms
2022-12-31 11:26:03.442 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - -
2022-12-31 11:26:03.527 -06:00 [DBG] Connection id "0HMNBAGBGBQU2" completed keep alive response.
2022-12-31 11:26:03.527 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 85.3100ms
2022-12-31 11:27:01.605 -06:00 [DBG] Connection id "0HMNBAGBGBQU2" received FIN.
2022-12-31 11:27:01.708 -06:00 [DBG] Connection id "0HMNBAGBGBQU2" sending FIN because: "The client closed the connection."
2022-12-31 11:27:01.709 -06:00 [DBG] Connection id "0HMNBAGBGBQU2" disconnecting.
2022-12-31 11:27:01.712 -06:00 [DBG] Connection id "0HMNBAGBGBQU2" stopped.

View File

@@ -0,0 +1,512 @@
2023-01-02 10:10:27.795 -06:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"]
2023-01-02 10:10:27.857 -06:00 [DBG] Hosting starting
2023-01-02 10:10:27.975 -06:00 [DBG] Using development certificate: CN=localhost (Thumbprint: D1AC045DA5B402C2D2761887E1B189C128A0E6AE)
2023-01-02 10:10:28.065 -06:00 [INF] Now listening on: https://localhost:7103
2023-01-02 10:10:28.065 -06:00 [INF] Now listening on: http://localhost:5106
2023-01-02 10:10:28.065 -06:00 [DBG] Loaded hosting startup assembly Venues
2023-01-02 10:10:28.066 -06:00 [INF] Application started. Press Ctrl+C to shut down.
2023-01-02 10:10:28.066 -06:00 [INF] Hosting environment: Development
2023-01-02 10:10:28.066 -06:00 [INF] Content root path: /Users/noahspannbauer/Developer/Work/mlb-game-day/Venues/
2023-01-02 10:10:28.066 -06:00 [DBG] Hosting started
2023-01-02 10:10:28.073 -06:00 [DBG] Connection id "0HMNCRFEKCP0T" accepted.
2023-01-02 10:10:28.074 -06:00 [DBG] Connection id "0HMNCRFEKCP0T" started.
2023-01-02 10:10:29.035 -06:00 [DBG] Connection id "0HMNCRFEKCP0T" received FIN.
2023-01-02 10:10:29.057 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:10:29.115 -06:00 [DBG] Connection id "0HMNCRFEKCP0T" stopped.
2023-01-02 10:10:29.118 -06:00 [DBG] Connection id "0HMNCRFEKCP0T" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:10:29.203 -06:00 [DBG] Connection id "0HMNCRFEKCP0U" accepted.
2023-01-02 10:10:29.204 -06:00 [DBG] Connection id "0HMNCRFEKCP0U" started.
2023-01-02 10:10:29.258 -06:00 [DBG] Connection 0HMNCRFEKCP0U established using the following protocol: "Tls12"
2023-01-02 10:10:29.354 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/index.html - -
2023-01-02 10:10:29.355 -06:00 [DBG] Wildcard detected, all requests with hosts will be allowed.
2023-01-02 10:10:29.411 -06:00 [DBG] Connection id "0HMNCRFEKCP0U" completed keep alive response.
2023-01-02 10:10:29.412 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/index.html - - - 200 - text/html;charset=utf-8 59.4324ms
2023-01-02 10:10:29.524 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - -
2023-01-02 10:10:29.561 -06:00 [DBG] Connection id "0HMNCRFEKCP0V" accepted.
2023-01-02 10:10:29.561 -06:00 [DBG] Connection id "0HMNCRFEKCP0V" started.
2023-01-02 10:10:29.586 -06:00 [DBG] Connection 0HMNCRFEKCP0V established using the following protocol: "Tls12"
2023-01-02 10:10:29.610 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/favicon-16x16.png - -
2023-01-02 10:10:29.615 -06:00 [INF] Sending file. Request path: '/favicon-16x16.png'. Physical path: 'N/A'
2023-01-02 10:10:29.615 -06:00 [DBG] Connection id "0HMNCRFEKCP0V" completed keep alive response.
2023-01-02 10:10:29.615 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/favicon-16x16.png - - - 200 665 image/png 4.5685ms
2023-01-02 10:10:29.638 -06:00 [DBG] Connection id "0HMNCRFEKCP0U" completed keep alive response.
2023-01-02 10:10:29.638 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 114.4893ms
2023-01-02 10:10:33.869 -06:00 [DBG] Connection id "0HMNCRFEKCP10" received FIN.
2023-01-02 10:10:33.870 -06:00 [DBG] Connection id "0HMNCRFEKCP10" accepted.
2023-01-02 10:10:33.870 -06:00 [DBG] Connection id "0HMNCRFEKCP10" started.
2023-01-02 10:10:33.870 -06:00 [DBG] Connection id "0HMNCRFEKCP11" accepted.
2023-01-02 10:10:33.897 -06:00 [DBG] Connection id "0HMNCRFEKCP11" started.
2023-01-02 10:10:33.871 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:10:33.926 -06:00 [DBG] Connection id "0HMNCRFEKCP10" stopped.
2023-01-02 10:10:33.929 -06:00 [DBG] Connection id "0HMNCRFEKCP10" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:10:33.956 -06:00 [DBG] Connection 0HMNCRFEKCP11 established using the following protocol: "Tls12"
2023-01-02 10:10:33.960 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/api/venues - -
2023-01-02 10:10:33.961 -06:00 [DBG] The request path does not match the path filter
2023-01-02 10:10:33.977 -06:00 [DBG] 1 candidate(s) found for the request path '/api/venues'
2023-01-02 10:10:33.981 -06:00 [DBG] Endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)' with route pattern 'api/venues' is valid for the request path '/api/venues'
2023-01-02 10:10:33.981 -06:00 [DBG] Request matched endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:10:33.983 -06:00 [INF] Executing endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:10:33.997 -06:00 [INF] Route matched with {action = "GetVenues", controller = "Venues"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult`1[System.Collections.Generic.IEnumerable`1[Venues.Models.VenueDto]]] GetVenues() on controller Venues.Controllers.VenuesController (Venues).
2023-01-02 10:10:33.997 -06:00 [DBG] Execution plan of authorization filters (in the following order): ["None"]
2023-01-02 10:10:33.998 -06:00 [DBG] Execution plan of resource filters (in the following order): ["None"]
2023-01-02 10:10:33.998 -06:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"]
2023-01-02 10:10:33.998 -06:00 [DBG] Execution plan of exception filters (in the following order): ["None"]
2023-01-02 10:10:33.998 -06:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"]
2023-01-02 10:10:33.998 -06:00 [DBG] Executing controller factory for controller Venues.Controllers.VenuesController (Venues)
2023-01-02 10:10:34.101 -06:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework.
2023-01-02 10:10:34.117 -06:00 [DBG] Executed controller factory for controller Venues.Controllers.VenuesController (Venues)
2023-01-02 10:10:34.470 -06:00 [INF] Entity Framework Core 6.0.12 initialized 'MlbGameDayContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:6.0.8+e68dfe8b5cbe4a26d20acc36def6187aa1cfdda3' with options: None
2023-01-02 10:10:34.496 -06:00 [DBG] Compiling query expression:
'DbSet<Venue>()
.OrderBy(v => v.Name)'
2023-01-02 10:10:34.657 -06:00 [DBG] Generated query execution expression:
'queryContext => new SingleQueryingEnumerable<Venue>(
(RelationalQueryContext)queryContext,
RelationalCommandCache.SelectExpression(
Projection Mapping:
EmptyProjectionMember -> Dictionary<IProperty, int> { [Property: Venue.Active (string), 0], [Property: Venue.Id (int?), 1], [Property: Venue.Link (string), 2], [Property: Venue.Name (string), 3] }
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name ASC),
Func<QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator, Venue>,
Venues.DbContexts.MlbGameDayContext,
False,
False,
True
)'
2023-01-02 10:10:34.683 -06:00 [DBG] Creating DbCommand for 'ExecuteReader'.
2023-01-02 10:10:34.724 -06:00 [DBG] Created DbCommand for 'ExecuteReader' (40ms).
2023-01-02 10:10:34.730 -06:00 [DBG] Opening connection to database 'mlb-game-day' on server ''.
2023-01-02 10:10:34.873 -06:00 [DBG] Opened connection to database 'mlb-game-day' on server 'tcp://localhost:5432'.
2023-01-02 10:10:34.880 -06:00 [DBG] Executing DbCommand [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name
2023-01-02 10:10:34.929 -06:00 [INF] Executed DbCommand (49ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name
2023-01-02 10:10:34.948 -06:00 [DBG] A data reader was disposed.
2023-01-02 10:10:34.953 -06:00 [DBG] Closing connection to database 'mlb-game-day' on server 'tcp://localhost:5432'.
2023-01-02 10:10:34.957 -06:00 [DBG] Closed connection to database 'mlb-game-day' on server ''.
2023-01-02 10:10:34.960 -06:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter"]
2023-01-02 10:10:34.961 -06:00 [DBG] No information found on request to perform content negotiation.
2023-01-02 10:10:34.961 -06:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response.
2023-01-02 10:10:34.961 -06:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result.
2023-01-02 10:10:34.961 -06:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response.
2023-01-02 10:10:34.961 -06:00 [INF] Executing OkObjectResult, writing value of type 'System.Collections.Generic.List`1[[Venues.Models.VenueDto, Venues, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
2023-01-02 10:10:34.966 -06:00 [INF] Executed action Venues.Controllers.VenuesController.GetVenues (Venues) in 966.0274ms
2023-01-02 10:10:34.967 -06:00 [INF] Executed endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:10:34.968 -06:00 [DBG] Connection id "0HMNCRFEKCP11" completed keep alive response.
2023-01-02 10:10:34.971 -06:00 [DBG] 'MlbGameDayContext' disposed.
2023-01-02 10:10:34.973 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/api/venues - - - 200 - application/json;+charset=utf-8 1012.9068ms
2023-01-02 10:10:59.826 -06:00 [DBG] Connection id "0HMNCRFEKCP0V" received FIN.
2023-01-02 10:10:59.826 -06:00 [DBG] Connection id "0HMNCRFEKCP0U" received FIN.
2023-01-02 10:10:59.857 -06:00 [DBG] Connection id "0HMNCRFEKCP0U" sending FIN because: "The client closed the connection."
2023-01-02 10:10:59.857 -06:00 [DBG] Connection id "0HMNCRFEKCP0V" sending FIN because: "The client closed the connection."
2023-01-02 10:10:59.858 -06:00 [DBG] Connection id "0HMNCRFEKCP0U" disconnecting.
2023-01-02 10:10:59.858 -06:00 [DBG] Connection id "0HMNCRFEKCP0V" disconnecting.
2023-01-02 10:10:59.861 -06:00 [DBG] Connection id "0HMNCRFEKCP0V" stopped.
2023-01-02 10:10:59.861 -06:00 [DBG] Connection id "0HMNCRFEKCP0U" stopped.
2023-01-02 10:21:41.325 -06:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"]
2023-01-02 10:21:41.377 -06:00 [DBG] Hosting starting
2023-01-02 10:21:41.462 -06:00 [DBG] Using development certificate: CN=localhost (Thumbprint: D1AC045DA5B402C2D2761887E1B189C128A0E6AE)
2023-01-02 10:21:41.576 -06:00 [INF] Now listening on: https://localhost:7103
2023-01-02 10:21:41.576 -06:00 [INF] Now listening on: http://localhost:5106
2023-01-02 10:21:41.576 -06:00 [DBG] Loaded hosting startup assembly Venues
2023-01-02 10:21:41.576 -06:00 [INF] Application started. Press Ctrl+C to shut down.
2023-01-02 10:21:41.576 -06:00 [INF] Hosting environment: Development
2023-01-02 10:21:41.577 -06:00 [INF] Content root path: /Users/noahspannbauer/Developer/Work/mlb-game-day/Venues/
2023-01-02 10:21:41.577 -06:00 [DBG] Hosting started
2023-01-02 10:21:41.582 -06:00 [DBG] Connection id "0HMNCRLNBFKOT" accepted.
2023-01-02 10:21:41.583 -06:00 [DBG] Connection id "0HMNCRLNBFKOT" started.
2023-01-02 10:21:42.495 -06:00 [DBG] Connection id "0HMNCRLNBFKOT" received FIN.
2023-01-02 10:21:42.509 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:21:42.560 -06:00 [DBG] Connection id "0HMNCRLNBFKOT" stopped.
2023-01-02 10:21:42.563 -06:00 [DBG] Connection id "0HMNCRLNBFKOT" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:21:42.630 -06:00 [DBG] Connection id "0HMNCRLNBFKOU" accepted.
2023-01-02 10:21:42.631 -06:00 [DBG] Connection id "0HMNCRLNBFKOU" started.
2023-01-02 10:21:42.693 -06:00 [DBG] Connection 0HMNCRLNBFKOU established using the following protocol: "Tls12"
2023-01-02 10:21:42.795 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/index.html - -
2023-01-02 10:21:42.796 -06:00 [DBG] Wildcard detected, all requests with hosts will be allowed.
2023-01-02 10:21:42.842 -06:00 [DBG] Connection id "0HMNCRLNBFKOU" completed keep alive response.
2023-01-02 10:21:42.843 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/index.html - - - 200 - text/html;charset=utf-8 49.5092ms
2023-01-02 10:21:42.945 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - -
2023-01-02 10:21:43.012 -06:00 [DBG] Connection id "0HMNCRLNBFKOU" completed keep alive response.
2023-01-02 10:21:43.012 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 67.1338ms
2023-01-02 10:21:48.085 -06:00 [DBG] Connection id "0HMNCRLNBFKOV" received FIN.
2023-01-02 10:21:48.091 -06:00 [DBG] Connection id "0HMNCRLNBFKOV" accepted.
2023-01-02 10:21:48.093 -06:00 [DBG] Connection id "0HMNCRLNBFKOV" started.
2023-01-02 10:21:48.118 -06:00 [DBG] Connection id "0HMNCRLNBFKP0" accepted.
2023-01-02 10:21:48.119 -06:00 [DBG] Connection id "0HMNCRLNBFKP0" started.
2023-01-02 10:21:48.120 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:21:48.123 -06:00 [DBG] Connection id "0HMNCRLNBFKOV" stopped.
2023-01-02 10:21:48.124 -06:00 [DBG] Connection id "0HMNCRLNBFKOV" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:21:48.151 -06:00 [DBG] Connection 0HMNCRLNBFKP0 established using the following protocol: "Tls12"
2023-01-02 10:21:48.165 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/api/venues - -
2023-01-02 10:21:48.168 -06:00 [DBG] The request path does not match the path filter
2023-01-02 10:21:48.185 -06:00 [DBG] 1 candidate(s) found for the request path '/api/venues'
2023-01-02 10:21:48.188 -06:00 [DBG] Endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)' with route pattern 'api/venues' is valid for the request path '/api/venues'
2023-01-02 10:21:48.189 -06:00 [DBG] Request matched endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:21:48.191 -06:00 [INF] Executing endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:21:48.203 -06:00 [INF] Route matched with {action = "GetVenues", controller = "Venues"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult`1[System.Collections.Generic.IEnumerable`1[Venues.Models.VenueDto]]] GetVenues() on controller Venues.Controllers.VenuesController (Venues).
2023-01-02 10:21:48.204 -06:00 [DBG] Execution plan of authorization filters (in the following order): ["None"]
2023-01-02 10:21:48.204 -06:00 [DBG] Execution plan of resource filters (in the following order): ["None"]
2023-01-02 10:21:48.204 -06:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"]
2023-01-02 10:21:48.204 -06:00 [DBG] Execution plan of exception filters (in the following order): ["None"]
2023-01-02 10:21:48.204 -06:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"]
2023-01-02 10:21:48.205 -06:00 [DBG] Executing controller factory for controller Venues.Controllers.VenuesController (Venues)
2023-01-02 10:21:48.307 -06:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework.
2023-01-02 10:21:48.387 -06:00 [DBG] Executed controller factory for controller Venues.Controllers.VenuesController (Venues)
2023-01-02 10:21:48.730 -06:00 [INF] Entity Framework Core 6.0.12 initialized 'MlbGameDayContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:6.0.8+e68dfe8b5cbe4a26d20acc36def6187aa1cfdda3' with options: None
2023-01-02 10:21:48.755 -06:00 [DBG] Compiling query expression:
'DbSet<Venue>()
.OrderBy(v => v.Name)'
2023-01-02 10:21:48.913 -06:00 [DBG] Generated query execution expression:
'queryContext => new SingleQueryingEnumerable<Venue>(
(RelationalQueryContext)queryContext,
RelationalCommandCache.SelectExpression(
Projection Mapping:
EmptyProjectionMember -> Dictionary<IProperty, int> { [Property: Venue.Active (string), 0], [Property: Venue.Id (int?), 1], [Property: Venue.Link (string), 2], [Property: Venue.Name (string), 3] }
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name ASC),
Func<QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator, Venue>,
Venues.DbContexts.MlbGameDayContext,
False,
False,
True
)'
2023-01-02 10:21:48.939 -06:00 [DBG] Creating DbCommand for 'ExecuteReader'.
2023-01-02 10:21:48.980 -06:00 [DBG] Created DbCommand for 'ExecuteReader' (40ms).
2023-01-02 10:21:48.986 -06:00 [DBG] Opening connection to database 'mlb-game-day' on server ''.
2023-01-02 10:21:49.187 -06:00 [DBG] Opened connection to database 'mlb-game-day' on server 'tcp://localhost:5432'.
2023-01-02 10:21:49.194 -06:00 [DBG] Executing DbCommand [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name
2023-01-02 10:21:49.247 -06:00 [INF] Executed DbCommand (54ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name
2023-01-02 10:21:49.268 -06:00 [DBG] A data reader was disposed.
2023-01-02 10:21:49.274 -06:00 [DBG] Closing connection to database 'mlb-game-day' on server 'tcp://localhost:5432'.
2023-01-02 10:21:49.279 -06:00 [DBG] Closed connection to database 'mlb-game-day' on server ''.
2023-01-02 10:21:49.295 -06:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter"]
2023-01-02 10:21:49.296 -06:00 [DBG] No information found on request to perform content negotiation.
2023-01-02 10:21:49.296 -06:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response.
2023-01-02 10:21:49.296 -06:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result.
2023-01-02 10:21:49.296 -06:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response.
2023-01-02 10:21:49.296 -06:00 [INF] Executing OkObjectResult, writing value of type 'System.Collections.Generic.List`1[[Venues.Models.VenueDto, Venues, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
2023-01-02 10:21:49.302 -06:00 [INF] Executed action Venues.Controllers.VenuesController.GetVenues (Venues) in 1094.9008ms
2023-01-02 10:21:49.302 -06:00 [INF] Executed endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:21:49.304 -06:00 [DBG] Connection id "0HMNCRLNBFKP0" completed keep alive response.
2023-01-02 10:21:49.306 -06:00 [DBG] 'MlbGameDayContext' disposed.
2023-01-02 10:21:49.310 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/api/venues - - - 200 - application/json;+charset=utf-8 1144.6185ms
2023-01-02 10:22:13.034 -06:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"]
2023-01-02 10:22:13.087 -06:00 [DBG] Hosting starting
2023-01-02 10:22:13.175 -06:00 [DBG] Using development certificate: CN=localhost (Thumbprint: D1AC045DA5B402C2D2761887E1B189C128A0E6AE)
2023-01-02 10:22:13.290 -06:00 [INF] Now listening on: https://localhost:7103
2023-01-02 10:22:13.290 -06:00 [INF] Now listening on: http://localhost:5106
2023-01-02 10:22:13.290 -06:00 [DBG] Loaded hosting startup assembly Venues
2023-01-02 10:22:13.291 -06:00 [INF] Application started. Press Ctrl+C to shut down.
2023-01-02 10:22:13.291 -06:00 [INF] Hosting environment: Development
2023-01-02 10:22:13.291 -06:00 [INF] Content root path: /Users/noahspannbauer/Developer/Work/mlb-game-day/Venues/
2023-01-02 10:22:13.291 -06:00 [DBG] Hosting started
2023-01-02 10:22:13.296 -06:00 [DBG] Connection id "0HMNCRM0PTSFL" accepted.
2023-01-02 10:22:13.297 -06:00 [DBG] Connection id "0HMNCRM0PTSFL" started.
2023-01-02 10:22:14.243 -06:00 [DBG] Connection id "0HMNCRM0PTSFL" received FIN.
2023-01-02 10:22:14.257 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:22:14.376 -06:00 [DBG] Connection id "0HMNCRM0PTSFL" stopped.
2023-01-02 10:22:14.382 -06:00 [DBG] Connection id "0HMNCRM0PTSFL" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:22:14.438 -06:00 [DBG] Connection id "0HMNCRM0PTSFM" accepted.
2023-01-02 10:22:14.438 -06:00 [DBG] Connection id "0HMNCRM0PTSFM" started.
2023-01-02 10:22:14.507 -06:00 [DBG] Connection 0HMNCRM0PTSFM established using the following protocol: "Tls12"
2023-01-02 10:22:14.618 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/index.html - -
2023-01-02 10:22:14.619 -06:00 [DBG] Wildcard detected, all requests with hosts will be allowed.
2023-01-02 10:22:14.668 -06:00 [DBG] Connection id "0HMNCRM0PTSFM" completed keep alive response.
2023-01-02 10:22:14.669 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/index.html - - - 200 - text/html;charset=utf-8 52.2322ms
2023-01-02 10:22:14.776 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - -
2023-01-02 10:22:14.843 -06:00 [DBG] Connection id "0HMNCRM0PTSFM" completed keep alive response.
2023-01-02 10:22:14.844 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 67.4693ms
2023-01-02 10:22:21.776 -06:00 [DBG] Connection id "0HMNCRM0PTSFN" received FIN.
2023-01-02 10:22:21.777 -06:00 [DBG] Connection id "0HMNCRM0PTSFN" accepted.
2023-01-02 10:22:21.777 -06:00 [DBG] Connection id "0HMNCRM0PTSFN" started.
2023-01-02 10:22:21.777 -06:00 [DBG] Connection id "0HMNCRM0PTSFO" accepted.
2023-01-02 10:22:21.804 -06:00 [DBG] Connection id "0HMNCRM0PTSFO" started.
2023-01-02 10:22:21.804 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:22:21.807 -06:00 [DBG] Connection id "0HMNCRM0PTSFN" stopped.
2023-01-02 10:22:21.807 -06:00 [DBG] Connection id "0HMNCRM0PTSFN" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:22:21.836 -06:00 [DBG] Connection 0HMNCRM0PTSFO established using the following protocol: "Tls12"
2023-01-02 10:22:21.845 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/api/venues - -
2023-01-02 10:22:21.850 -06:00 [DBG] The request path does not match the path filter
2023-01-02 10:22:21.868 -06:00 [DBG] 1 candidate(s) found for the request path '/api/venues'
2023-01-02 10:22:21.870 -06:00 [DBG] Endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)' with route pattern 'api/venues' is valid for the request path '/api/venues'
2023-01-02 10:22:21.871 -06:00 [DBG] Request matched endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:22:21.874 -06:00 [INF] Executing endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:22:21.886 -06:00 [INF] Route matched with {action = "GetVenues", controller = "Venues"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult`1[System.Collections.Generic.IEnumerable`1[Venues.Models.VenueDto]]] GetVenues() on controller Venues.Controllers.VenuesController (Venues).
2023-01-02 10:22:21.886 -06:00 [DBG] Execution plan of authorization filters (in the following order): ["None"]
2023-01-02 10:22:21.886 -06:00 [DBG] Execution plan of resource filters (in the following order): ["None"]
2023-01-02 10:22:21.886 -06:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"]
2023-01-02 10:22:21.886 -06:00 [DBG] Execution plan of exception filters (in the following order): ["None"]
2023-01-02 10:22:21.886 -06:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"]
2023-01-02 10:22:21.886 -06:00 [DBG] Executing controller factory for controller Venues.Controllers.VenuesController (Venues)
2023-01-02 10:22:22.001 -06:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework.
2023-01-02 10:22:22.089 -06:00 [DBG] Executed controller factory for controller Venues.Controllers.VenuesController (Venues)
2023-01-02 10:22:22.436 -06:00 [INF] Entity Framework Core 6.0.12 initialized 'MlbGameDayContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:6.0.8+e68dfe8b5cbe4a26d20acc36def6187aa1cfdda3' with options: None
2023-01-02 10:22:22.461 -06:00 [DBG] Compiling query expression:
'DbSet<Venue>()
.OrderBy(v => v.Name)'
2023-01-02 10:22:22.623 -06:00 [DBG] Generated query execution expression:
'queryContext => new SingleQueryingEnumerable<Venue>(
(RelationalQueryContext)queryContext,
RelationalCommandCache.SelectExpression(
Projection Mapping:
EmptyProjectionMember -> Dictionary<IProperty, int> { [Property: Venue.Active (string), 0], [Property: Venue.Id (int?), 1], [Property: Venue.Link (string), 2], [Property: Venue.Name (string), 3] }
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name ASC),
Func<QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator, Venue>,
Venues.DbContexts.MlbGameDayContext,
False,
False,
True
)'
2023-01-02 10:22:22.649 -06:00 [DBG] Creating DbCommand for 'ExecuteReader'.
2023-01-02 10:22:22.690 -06:00 [DBG] Created DbCommand for 'ExecuteReader' (39ms).
2023-01-02 10:22:22.696 -06:00 [DBG] Opening connection to database 'mlb-game-day' on server ''.
2023-01-02 10:22:22.858 -06:00 [DBG] Opened connection to database 'mlb-game-day' on server 'tcp://localhost:5432'.
2023-01-02 10:22:22.864 -06:00 [DBG] Executing DbCommand [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name
2023-01-02 10:22:22.909 -06:00 [INF] Executed DbCommand (44ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
ORDER BY v.name
2023-01-02 10:22:22.927 -06:00 [DBG] A data reader was disposed.
2023-01-02 10:22:22.932 -06:00 [DBG] Closing connection to database 'mlb-game-day' on server 'tcp://localhost:5432'.
2023-01-02 10:22:22.936 -06:00 [DBG] Closed connection to database 'mlb-game-day' on server ''.
2023-01-02 10:22:22.951 -06:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter"]
2023-01-02 10:22:22.952 -06:00 [DBG] No information found on request to perform content negotiation.
2023-01-02 10:22:22.952 -06:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response.
2023-01-02 10:22:22.952 -06:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result.
2023-01-02 10:22:22.952 -06:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response.
2023-01-02 10:22:22.952 -06:00 [INF] Executing OkObjectResult, writing value of type 'System.Collections.Generic.List`1[[Venues.Models.VenueDto, Venues, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
2023-01-02 10:22:22.957 -06:00 [INF] Executed action Venues.Controllers.VenuesController.GetVenues (Venues) in 1068.576ms
2023-01-02 10:22:22.958 -06:00 [INF] Executed endpoint 'Venues.Controllers.VenuesController.GetVenues (Venues)'
2023-01-02 10:22:22.959 -06:00 [DBG] Connection id "0HMNCRM0PTSFO" completed keep alive response.
2023-01-02 10:22:22.962 -06:00 [DBG] 'MlbGameDayContext' disposed.
2023-01-02 10:22:22.965 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/api/venues - - - 200 - application/json;+charset=utf-8 1120.2250ms
2023-01-02 10:22:58.141 -06:00 [DBG] Connection id "0HMNCRM0PTSFM" received FIN.
2023-01-02 10:22:58.180 -06:00 [DBG] Connection id "0HMNCRM0PTSFM" sending FIN because: "The client closed the connection."
2023-01-02 10:22:58.181 -06:00 [DBG] Connection id "0HMNCRM0PTSFM" disconnecting.
2023-01-02 10:22:58.184 -06:00 [DBG] Connection id "0HMNCRM0PTSFM" stopped.
2023-01-02 10:28:15.209 -06:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"]
2023-01-02 10:28:15.262 -06:00 [DBG] Hosting starting
2023-01-02 10:28:15.360 -06:00 [DBG] Using development certificate: CN=localhost (Thumbprint: D1AC045DA5B402C2D2761887E1B189C128A0E6AE)
2023-01-02 10:28:15.503 -06:00 [INF] Now listening on: https://localhost:7103
2023-01-02 10:28:15.529 -06:00 [INF] Now listening on: http://localhost:5106
2023-01-02 10:28:15.529 -06:00 [DBG] Loaded hosting startup assembly Venues
2023-01-02 10:28:15.529 -06:00 [INF] Application started. Press Ctrl+C to shut down.
2023-01-02 10:28:15.529 -06:00 [INF] Hosting environment: Development
2023-01-02 10:28:15.529 -06:00 [INF] Content root path: /Users/noahspannbauer/Developer/Work/mlb-game-day/Venues/
2023-01-02 10:28:15.529 -06:00 [DBG] Hosting started
2023-01-02 10:28:15.535 -06:00 [DBG] Connection id "0HMNCRPCOGC2P" accepted.
2023-01-02 10:28:15.536 -06:00 [DBG] Connection id "0HMNCRPCOGC2P" started.
2023-01-02 10:28:16.404 -06:00 [DBG] Connection id "0HMNCRPCOGC2P" received FIN.
2023-01-02 10:28:16.417 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:28:16.457 -06:00 [DBG] Connection id "0HMNCRPCOGC2P" stopped.
2023-01-02 10:28:16.460 -06:00 [DBG] Connection id "0HMNCRPCOGC2P" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:28:16.511 -06:00 [DBG] Connection id "0HMNCRPCOGC2Q" accepted.
2023-01-02 10:28:16.512 -06:00 [DBG] Connection id "0HMNCRPCOGC2Q" started.
2023-01-02 10:28:16.568 -06:00 [DBG] Connection 0HMNCRPCOGC2Q established using the following protocol: "Tls12"
2023-01-02 10:28:16.676 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/index.html - -
2023-01-02 10:28:16.676 -06:00 [DBG] Wildcard detected, all requests with hosts will be allowed.
2023-01-02 10:28:16.725 -06:00 [DBG] Connection id "0HMNCRPCOGC2Q" completed keep alive response.
2023-01-02 10:28:16.726 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/index.html - - - 200 - text/html;charset=utf-8 51.8814ms
2023-01-02 10:28:16.833 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - -
2023-01-02 10:28:16.902 -06:00 [DBG] Connection id "0HMNCRPCOGC2Q" completed keep alive response.
2023-01-02 10:28:16.902 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 68.6707ms
2023-01-02 10:28:27.989 -06:00 [DBG] Connection id "0HMNCRPCOGC2R" received FIN.
2023-01-02 10:28:27.990 -06:00 [DBG] Connection id "0HMNCRPCOGC2R" accepted.
2023-01-02 10:28:27.991 -06:00 [DBG] Connection id "0HMNCRPCOGC2R" started.
2023-01-02 10:28:27.991 -06:00 [DBG] Connection id "0HMNCRPCOGC2S" accepted.
2023-01-02 10:28:27.991 -06:00 [DBG] Connection id "0HMNCRPCOGC2S" started.
2023-01-02 10:28:27.992 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:28:27.993 -06:00 [DBG] Connection id "0HMNCRPCOGC2R" stopped.
2023-01-02 10:28:27.994 -06:00 [DBG] Connection id "0HMNCRPCOGC2R" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:28:28.021 -06:00 [DBG] Connection 0HMNCRPCOGC2S established using the following protocol: "Tls12"
2023-01-02 10:28:28.027 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/api/venues/3312 - -
2023-01-02 10:28:28.029 -06:00 [DBG] The request path does not match the path filter
2023-01-02 10:28:28.043 -06:00 [DBG] 1 candidate(s) found for the request path '/api/venues/3312'
2023-01-02 10:28:28.046 -06:00 [DBG] Endpoint 'Venues.Controllers.VenuesController.GetVenue (Venues)' with route pattern 'api/venues/{id}' is valid for the request path '/api/venues/3312'
2023-01-02 10:28:28.046 -06:00 [DBG] Request matched endpoint 'Venues.Controllers.VenuesController.GetVenue (Venues)'
2023-01-02 10:28:28.049 -06:00 [INF] Executing endpoint 'Venues.Controllers.VenuesController.GetVenue (Venues)'
2023-01-02 10:28:28.070 -06:00 [INF] Route matched with {action = "GetVenue", controller = "Venues"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult`1[Venues.Models.VenueDto]] GetVenue(Int32) on controller Venues.Controllers.VenuesController (Venues).
2023-01-02 10:28:28.070 -06:00 [DBG] Execution plan of authorization filters (in the following order): ["None"]
2023-01-02 10:28:28.071 -06:00 [DBG] Execution plan of resource filters (in the following order): ["None"]
2023-01-02 10:28:28.071 -06:00 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"]
2023-01-02 10:28:28.071 -06:00 [DBG] Execution plan of exception filters (in the following order): ["None"]
2023-01-02 10:28:28.071 -06:00 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"]
2023-01-02 10:28:28.071 -06:00 [DBG] Executing controller factory for controller Venues.Controllers.VenuesController (Venues)
2023-01-02 10:28:28.175 -06:00 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework.
2023-01-02 10:28:28.254 -06:00 [DBG] Executed controller factory for controller Venues.Controllers.VenuesController (Venues)
2023-01-02 10:28:28.256 -06:00 [DBG] Attempting to bind parameter 'id' of type 'System.Int32' ...
2023-01-02 10:28:28.256 -06:00 [DBG] Attempting to bind parameter 'id' of type 'System.Int32' using the name 'id' in request data ...
2023-01-02 10:28:28.257 -06:00 [DBG] Done attempting to bind parameter 'id' of type 'System.Int32'.
2023-01-02 10:28:28.257 -06:00 [DBG] Done attempting to bind parameter 'id' of type 'System.Int32'.
2023-01-02 10:28:28.257 -06:00 [DBG] Attempting to validate the bound parameter 'id' of type 'System.Int32' ...
2023-01-02 10:28:28.257 -06:00 [DBG] Done attempting to validate the bound parameter 'id' of type 'System.Int32'.
2023-01-02 10:28:28.607 -06:00 [INF] Entity Framework Core 6.0.12 initialized 'MlbGameDayContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:6.0.8+e68dfe8b5cbe4a26d20acc36def6187aa1cfdda3' with options: None
2023-01-02 10:28:28.644 -06:00 [DBG] Compiling query expression:
'DbSet<Venue>()
.Where(v => v.Id == __venueId_0)
.FirstOrDefault()'
2023-01-02 10:28:28.809 -06:00 [DBG] Generated query execution expression:
'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync<Venue>(
asyncEnumerable: new SingleQueryingEnumerable<Venue>(
(RelationalQueryContext)queryContext,
RelationalCommandCache.SelectExpression(
Projection Mapping:
EmptyProjectionMember -> Dictionary<IProperty, int> { [Property: Venue.Active (string), 0], [Property: Venue.Id (int?), 1], [Property: Venue.Link (string), 2], [Property: Venue.Name (string), 3] }
SELECT TOP(1) v.active, v.id, v.link, v.name
FROM venue AS v
WHERE v.id == @__venueId_0),
Func<QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator, Venue>,
Venues.DbContexts.MlbGameDayContext,
False,
False,
True
),
cancellationToken: queryContext.CancellationToken)'
2023-01-02 10:28:28.844 -06:00 [DBG] Creating DbCommand for 'ExecuteReader'.
2023-01-02 10:28:28.887 -06:00 [DBG] Created DbCommand for 'ExecuteReader' (41ms).
2023-01-02 10:28:28.894 -06:00 [DBG] Opening connection to database 'mlb-game-day' on server ''.
2023-01-02 10:28:29.058 -06:00 [DBG] Opened connection to database 'mlb-game-day' on server 'tcp://localhost:5432'.
2023-01-02 10:28:29.066 -06:00 [DBG] Executing DbCommand [Parameters=[@__venueId_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30']
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
WHERE v.id = @__venueId_0
LIMIT 1
2023-01-02 10:28:29.119 -06:00 [INF] Executed DbCommand (56ms) [Parameters=[@__venueId_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30']
SELECT v.active, v.id, v.link, v.name
FROM venue AS v
WHERE v.id = @__venueId_0
LIMIT 1
2023-01-02 10:28:29.139 -06:00 [DBG] A data reader was disposed.
2023-01-02 10:28:29.144 -06:00 [DBG] Closing connection to database 'mlb-game-day' on server 'tcp://localhost:5432'.
2023-01-02 10:28:29.148 -06:00 [DBG] Closed connection to database 'mlb-game-day' on server ''.
2023-01-02 10:28:29.157 -06:00 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter"]
2023-01-02 10:28:29.158 -06:00 [DBG] No information found on request to perform content negotiation.
2023-01-02 10:28:29.158 -06:00 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response.
2023-01-02 10:28:29.158 -06:00 [DBG] Attempting to select the first formatter in the output formatters list which can write the result.
2023-01-02 10:28:29.158 -06:00 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter' and content type 'application/json' to write the response.
2023-01-02 10:28:29.158 -06:00 [INF] Executing OkObjectResult, writing value of type 'Venues.Models.VenueDto'.
2023-01-02 10:28:29.163 -06:00 [INF] Executed action Venues.Controllers.VenuesController.GetVenue (Venues) in 1089.8089ms
2023-01-02 10:28:29.164 -06:00 [INF] Executed endpoint 'Venues.Controllers.VenuesController.GetVenue (Venues)'
2023-01-02 10:28:29.165 -06:00 [DBG] Connection id "0HMNCRPCOGC2S" completed keep alive response.
2023-01-02 10:28:29.168 -06:00 [DBG] 'MlbGameDayContext' disposed.
2023-01-02 10:28:29.172 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/api/venues/3312 - - - 200 - application/json;+charset=utf-8 1145.4517ms
2023-01-02 10:29:02.056 -06:00 [DBG] Connection id "0HMNCRPCOGC2Q" received FIN.
2023-01-02 10:29:02.109 -06:00 [DBG] Connection id "0HMNCRPCOGC2Q" sending FIN because: "The client closed the connection."
2023-01-02 10:29:02.110 -06:00 [DBG] Connection id "0HMNCRPCOGC2Q" disconnecting.
2023-01-02 10:29:02.113 -06:00 [DBG] Connection id "0HMNCRPCOGC2Q" stopped.
2023-01-02 10:29:09.777 -06:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"]
2023-01-02 10:29:09.849 -06:00 [DBG] Hosting starting
2023-01-02 10:29:09.939 -06:00 [DBG] Using development certificate: CN=localhost (Thumbprint: D1AC045DA5B402C2D2761887E1B189C128A0E6AE)
2023-01-02 10:29:09.999 -06:00 [INF] Now listening on: https://localhost:7103
2023-01-02 10:29:09.999 -06:00 [INF] Now listening on: http://localhost:5106
2023-01-02 10:29:10.000 -06:00 [DBG] Loaded hosting startup assembly Venues
2023-01-02 10:29:10.000 -06:00 [INF] Application started. Press Ctrl+C to shut down.
2023-01-02 10:29:10.000 -06:00 [INF] Hosting environment: Development
2023-01-02 10:29:10.000 -06:00 [INF] Content root path: /Users/noahspannbauer/Developer/Work/mlb-game-day/Venues/
2023-01-02 10:29:10.000 -06:00 [DBG] Hosting started
2023-01-02 10:29:10.007 -06:00 [DBG] Connection id "0HMNCRPSVVSRR" accepted.
2023-01-02 10:29:10.033 -06:00 [DBG] Connection id "0HMNCRPSVVSRR" started.
2023-01-02 10:29:11.002 -06:00 [DBG] Connection id "0HMNCRPSVVSRR" received FIN.
2023-01-02 10:29:11.017 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:29:11.066 -06:00 [DBG] Connection id "0HMNCRPSVVSRR" stopped.
2023-01-02 10:29:11.070 -06:00 [DBG] Connection id "0HMNCRPSVVSRR" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:29:11.140 -06:00 [DBG] Connection id "0HMNCRPSVVSRS" accepted.
2023-01-02 10:29:11.141 -06:00 [DBG] Connection id "0HMNCRPSVVSRS" started.
2023-01-02 10:29:11.197 -06:00 [DBG] Connection 0HMNCRPSVVSRS established using the following protocol: "Tls12"
2023-01-02 10:29:11.315 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/index.html - -
2023-01-02 10:29:11.315 -06:00 [DBG] Wildcard detected, all requests with hosts will be allowed.
2023-01-02 10:29:11.364 -06:00 [DBG] Connection id "0HMNCRPSVVSRS" completed keep alive response.
2023-01-02 10:29:11.365 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/index.html - - - 200 - text/html;charset=utf-8 51.4456ms
2023-01-02 10:29:11.472 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - -
2023-01-02 10:29:11.539 -06:00 [DBG] Connection id "0HMNCRPSVVSRS" completed keep alive response.
2023-01-02 10:29:11.539 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 66.7127ms
2023-01-02 10:29:17.659 -06:00 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"]
2023-01-02 10:29:17.733 -06:00 [DBG] Hosting starting
2023-01-02 10:29:17.833 -06:00 [DBG] Using development certificate: CN=localhost (Thumbprint: D1AC045DA5B402C2D2761887E1B189C128A0E6AE)
2023-01-02 10:29:17.992 -06:00 [INF] Now listening on: https://localhost:7103
2023-01-02 10:29:17.992 -06:00 [INF] Now listening on: http://localhost:5106
2023-01-02 10:29:17.992 -06:00 [DBG] Loaded hosting startup assembly Venues
2023-01-02 10:29:17.992 -06:00 [INF] Application started. Press Ctrl+C to shut down.
2023-01-02 10:29:17.993 -06:00 [INF] Hosting environment: Development
2023-01-02 10:29:17.993 -06:00 [INF] Content root path: /Users/noahspannbauer/Developer/Work/mlb-game-day/Venues/
2023-01-02 10:29:17.993 -06:00 [DBG] Hosting started
2023-01-02 10:29:17.999 -06:00 [DBG] Connection id "0HMNCRPVC6QKH" accepted.
2023-01-02 10:29:18.000 -06:00 [DBG] Connection id "0HMNCRPVC6QKH" started.
2023-01-02 10:29:18.855 -06:00 [DBG] Connection id "0HMNCRPVC6QKH" received FIN.
2023-01-02 10:29:18.874 -06:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-01-02 10:29:18.897 -06:00 [DBG] Connection id "0HMNCRPVC6QKH" stopped.
2023-01-02 10:29:18.900 -06:00 [DBG] Connection id "0HMNCRPVC6QKH" sending FIN because: "The Socket transport's send loop completed gracefully."
2023-01-02 10:29:18.901 -06:00 [DBG] Connection id "0HMNCRPVC6QKI" accepted.
2023-01-02 10:29:18.901 -06:00 [DBG] Connection id "0HMNCRPVC6QKI" started.
2023-01-02 10:29:18.942 -06:00 [DBG] Connection 0HMNCRPVC6QKI established using the following protocol: "Tls12"
2023-01-02 10:29:18.968 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/index.html - -
2023-01-02 10:29:18.968 -06:00 [DBG] Wildcard detected, all requests with hosts will be allowed.
2023-01-02 10:29:19.018 -06:00 [DBG] Connection id "0HMNCRPVC6QKI" completed keep alive response.
2023-01-02 10:29:19.019 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/index.html - - - 200 - text/html;charset=utf-8 53.3133ms
2023-01-02 10:29:19.074 -06:00 [INF] Request starting HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - -
2023-01-02 10:29:19.130 -06:00 [DBG] Connection id "0HMNCRPVC6QKI" completed keep alive response.
2023-01-02 10:29:19.130 -06:00 [INF] Request finished HTTP/1.1 GET https://localhost:7103/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 55.5481ms