Therefore, it is time for question period. The member from the Government of California. My question is to the President of Treasury Board. Friday, your government was forced to defend the indefensible, spending almost $54,000 to purchase luxury Canada goose jackets for Ministry of Children and Youth Services staff. At the same time, the Ministry was cutting funding to children with autism treatment. Speaker, does this government still support the purchase of $1,000 luxury winter jackets? Thank you, President Treasury Board. Minister of Children and Youth Services. Minister of Children and Youth Services. Well, thank you very much, Mr. Speaker. And first, I want to start. I want to talk a little bit about the statement that the member made opposite in regards to autism funding. Number one, the member knows clearly that this is the largest single investment into autism in the history of this country, half a billion dollars. So when she goes around making comments that we've actually made cuts, that's not factual. Number one, number two, the member opposite knows that we run youth correctional facilities right across this province, and we have youth facilities in northern Ontario. And it gets cold up there. I still care. Finish, please. Thank you, Mr. Speaker. And as I was saying, it gets cold in northern Ontario. As the member's opposite would understand. The member from Renfrew, Nipissing, Pembroke is warned. Nothing's changing. Time is up. Supplementary. Back to the President of Treasury Board, because the Minister's just digging himself a digger hole, a bigger hole. Children with autism, we're looking for your government for help. Children and child protection, look to the government to protect them from predators. Some of our province's most vulnerable needed our government to step up. And what did you do instead? They learned that you're buying high-end luxury Canada goose jackets while they sit on waiting lists. Speaker, will the President of Treasury put a stop to the purchasing of high-end luxury goods for their staff? Yes, or no? Thank you, Mr. Speaker. As I was saying, in northern Ontario, it sometimes dips below 40 degrees. And I know I've been there. 40 below. So, Mr. Speaker, there is uniforms that are required for our staff in these facilities. We have a simple procurement process here in the province of Ontario that not only this government has used, but other governments have used. So what we do, if the members don't know how the process works, we put out a request, we ask for supplies, and the quotes come in. We have a process that is arms-length that allows for non-political interference. And we take the best offer made. And in this case, it happened to be the best offer made. These are quotes that have a 10-year guarantee. They're used as members and staff work within those facilities. They're transferred from staff to staff. Thank you. The government of Ontario owns these. Final supplementary.  You were suggesting the only vendor who had any ability to provide these quotes in Canada goose through the speaker, then table the tendering documents and prove to the families in Ontario that the money was well spent. Because at this point, nobody believes you, minister. Mr. Speaker, first of all, we get the best possible price based on the process we have in place. And in this case, these quotes were heavily discounted, the quotes that we received. You know, it's interesting that the lead-off question by the progressive conservative parties around quotes that are keeping staff warm. Well, we're focusing on... Stop the clock. Besides the first one, we're very close to warnings. Finish, please. No, Mr. Speaker. We put in place processes in government to ensure that there are no political interference when it comes to purchasing products. This process is a government process that's put in place where bids come in and there was a substantial discount. The member knows clearly opposite that if you release all the tendering prices in any type of competitive process, then it puts the supplier at a disadvantage in the future. And you claim to be the party that knows business well. If you can't figure out a procurement process, how could you figure out what's best for this province? Thank you. New question, the member from Kitchener-Connistor. Thank you, Mr. Speaker. My question is to the minister of transportation. Mr. Speaker, last week, this government had an opportunity to make Bill 65 truly about school safety. The Liberals had the opportunity to work with us to protect our children from school bus blow-bys, a vital initiative put forward by my colleague from Chatham-Kanesics. They chose instead to say no and place partisan politics over the safety of our children. Here, here. Speaker, will the minister explain why the Liberal government believes the safety of our children on school buses should wait? Good question. Thank you. Thank you. Thank you. Thank you very much, Speaker. I will repeat this morning what I said last week regarding this, both in this chamber and to media outside. We want to make sure at the Ministry of Transportation that as we move forward and continue to bring in enhancements or improvements to help all users of our roads, including our most vulnerable, including students themselves, Speaker, we will want to make sure that, fundamentally, particularly as it relates to technology, that we're going to find a way to get it right, Speaker. But again, what I said last week in this chamber in response to Bill 65 is that that member and the conservative caucus knows that they've had multiple opportunities at committee. And frankly, Speaker, during debate here at first and second reading, to be supportive generally speaking with the thrust of Bill 65, and repeatedly, both here in the chamber and at committee, Speaker, they have chosen instead to use administrative techniques to filibuster the legislation and to delay its implementation. That's unfortunate. But I certainly look forward to the follow-up and the third question here this morning. Supplementary. This is so disappointing. Disappointing to students, disappointing to parents, disappointing for Ontario. Instead of choosing to take action against school bus blow-bys, this Liberal government chose partisan roadblocks and delay. And the typical Liberal call for study and review. Speaker, every day there are more than two blow-bys per bus in Mississauga alone. Time for action. Will the minister tell us why this isn't a priority for his government? That's a good question. Minister. So, Speaker, that member knows full well that currently there is nothing in any law that prevents the use of this particular technology on a school bus. And in fact, there are multiple municipalities that have spoken to us about launching pilots. And in fact, I believe some have, Speaker. But again, fundamentally what this is, and we saw this start last week with this member and his leader, Patrick Brown, Speaker, it is a tactical maneuver. Sorry. I'm just gonna ask you to refer to just the leader of the opposition title or writing piece. Thanks very much, Speaker. So as I was saying, this member and his leader, Mr. Brown, at the end of the day, Speaker, this is a tactical maneuver because they are embarrassed and rightly so, Speaker. Fundamentally, at committee last week, we saw that this particular member and the conservative caucus introduced hundreds and hundreds and hundreds of administrative amendments to the legislation designed specifically to block its passage. They're trying to make themselves look good, Speaker. It's not gonna work. Thank you. Final supplementary. His answer was fake news, Speaker. Yep. While last week's opportunity has passed, we're going to give the minister and his liberal members one more chance to do what's best for students' school bus safety today. Our leader, Patrick Brown, wrote all three house leaders today, reaffirming that there is no monopoly on a good idea. And with that, we wanna acknowledge the NDP for supporting us on this important safety initiative. Speaker, will the minister direct his liberal members to right this wrong at committee today? Here, here. And vote to protect our children from school bus blow-bys today? There it is. So, Speaker, as I said repeatedly, the safety of school children, the safety of all of our vulnerable road users is a top priority for the ministry. In fact, Speaker, that's why we introduced Bill 65 and literally at every turn during in-debate and at committee, that member and his leader, Mr. Brown, the leader of the official opposition have repeatedly sought ways to actually slow down the passage of the legislation. They realized that it would be an embarrassing situation for them for this to become public, as it did last week, Speaker, that they literally had 300 plus amendments, only one of which dealt with this specific issue, but literally over 300 street by street by street, including, Speaker, Avenue Road, just outside of Allenby Public School, where representatives from that school came to committee to let that member and his leader know that it was important to move forward Bill 65. It was reprehensible behavior, Speaker. The public is not fooled. We'll continue to get the job done right, but they should help us pass Bill 65. Thanks very much. Thank you, Senator, please. Thank you. New question? The member from Toronto, Danforth. Thank you, Speaker. Speaker, my question to the acting Premier. It's been 68 days since the Liberals announced they would refinance an increasingly privatized hydro system, adding billions of dollars in new debts for customers and leaving fat profits for already profitable multinational energy companies. New Democrats said it then and will say it now. The government can't expect to table legislation that will make massive changes to the hydro system that are bad for people and businesses and expect to ram it through this legislature with little or no opportunity for public input. With just 12 sitting days left, why haven't we seen a bill? Thank you. Thank you, Premier. I will pass the supplementary onto the Minister of Energy, but I do want to take this opportunity to acknowledge that on Friday, the Speaker announced he will not be seeking re-election in 2018, and I want to just say to you, Speaker, that I want to say thank you for the work you have done in this legislature and in your community. You've been a real inspiration for all of us. I'll still give warnings. Supplementary. Speaker, again, to the acting Premier. People deserve to see the Liberal Plan in black and white so they can debate it and so the legislature can debate it too. Don't hide the details. Don't delay. Don't come to the legislature just before it rises this summer with a last-minute bill, ultimatums, and no time for committees. Experts and the people of Ontario to take the time they need to examine the bill. That was NDP leader Andrea Horvath almost two months ago. There is still no plan, no legislation, and the House is scheduled to rise in 12 sitting days. This is exactly what we warned about. Is the government going to try and ram through a hydro-bill and shut out the public with no time to hear from the people of Ontario? Question? Thank you. To the Minister of Energy. Thank you, Mr. Speaker. Please to rise and talk about the fair hydro plan that we've been talking about for the last two months, Mr. Speaker, and letting people know that they're going to be saving, Mr. Speaker, up to, on average, 25% on their bills. Some will be higher, Mr. Speaker, and especially for those that live in the rural or remote parts of our province, Northern Ontario, Mr. Speaker, they can see up to 40 and 50% coming off of their bills. And Mr. Speaker, the OEB, the Ontario Energy Board, recognized that in anticipation of us bringing forward this legislation, they brought forward on May 1st an additional 9% reduction, meaning we're seeing a 17% reduction on our bills compared to last year, Mr. Speaker, right now. And I know that's hard for the opposition to understand, Mr. Speaker, because one of them has no plan and the other plan that they have doesn't make sense, Mr. Speaker. This is something that's acting and working, Mr. Speaker. Thank you. Final supplementary. Speaker, the Liberal plan will add $40 billion in debt. $40 billion. It will double down on private contracts. This is a big deal. And Ontarians want their voices to be heard. This bill should be debated. It should have committee hearings. The committee should travel and the people should get their say. Is the government getting ready to ram through their hydro bill without real debate, real examination, and real public input? That's what they're doing. Thank you, Mr. Speaker. So let's talk about real. 25% reduction is a real relief for families across the province, Mr. Speaker. 40 to 50% reduction on rural or remote rate protection plans. That's real relief coming to families in our rural parts of our province, Mr. Speaker. 500,000 businesses. That's 500,000 real small businesses and farms. They will also see the 25% reduction, Mr. Speaker. But let's talk about unreal, Mr. Speaker. Not realistic, Mr. Speaker. That's their plan, Mr. Speaker, that they don't even talk about anymore. They forgot that they brought forward a plan. Probably, Mr. Speaker, because it's not a plan that will bring any real relief to families across this province. Our Ontario Fair Hydro Plan will bring real relief for families. New question, the member from Nicobill. Merci, Monsieur le Président. My question is to the Acting Premier. And I would like to start by wishing all of the nurses out there happy nursing week. My question is quite simple. Does the Premier believe our hospital should only be available to people under the age of 25 and over the age of 65? Yep. Thank you. Deputy Premier. To the Minister of Health and Long-term Care. Minister of Health, Long-term Care. Well, thank you, Mr. Speaker. I also want to recognize and congratulate and appreciate all of the more than 100, well over 100,000 nurses that work throughout our healthcare system, in our hospitals, in our long-term care homes, in homes, in community organizations, throughout the public health system, our 25 nurse practitioner-led clinics. They are the bedrock of our healthcare system. And I'm so appreciative of the hard work that they do every day. When it comes to the issue, I think the member opposite is alluding to our proposal that 4 million children and youth, up to their 25th birthday, will receive access absolutely free of charge to more than 4,000 medications, the entire drug formulae of this province. If that's what she's referring to, yes, in fact, it will be implemented January 1st of 2018. Thank you, Speaker. The 7th Ontario drug plan, I would say, has to be outlined in a budget, leaves working people unable to afford the medication they need. We don't leave working people out of our hospital. We don't leave working people out of getting an MRI. We don't leave working people out of getting surgery. We don't leave working people out of seeing a family physician. Why won't the Premier bring in a universal pharmacare program? Thank you, Minister. Well, Mr. Speaker, so our drug plan will cover our pharmacare plan roughly 30 times as many medicines as their proposal. For 4,275 more medicines to their 125. But Mr. Speaker, Steve Morgan, who stood up with the leader of the third party when she made her proposal, had this to say in a TVO article last week, quote, I'm sure when we write the history of pharmacare in Canada, this will, this, our proposal, he was referring to, will be seen as the time when a clear principle was laid down by a provincial government. I'm proud of the courage that this Premier has demonstrated in the leadership to deliver the beginnings in an important, a major part of pharmacare. You'll have a wrap up. I want to remind members that if you move from one seat to another, it doesn't change the fact that you're not supposed to heckle. Just to let you know, you have one wrap up sentence. Oh, I got a wrap up. Well, and Natalie Merrill of the Ontario Health Coalition, they know well, said this is an amazing announcement that will provide national leadership. This is a great first step in the right direction. I agree with you, Mr. Speaker. Final supplementary. Thank you, Speaker. Well, the minister would know essential medicine are just that they are the medications that are essential. We have a plan supported by the World Health Organization that ensure that every single Ontarian has access to essential medicine, no matter how old you are, no matter where you live, no matter how much money you make, why is the minister, why is the Premier refusing to support universal drug coverage for all Ontarians? Thank you, Mr. Speaker. Mr. Speaker, I was at Sick Kids with the member from Trinity Spadina on Friday, making an announcement of our 500 million additional dollars for operating cost to hospitals, but we had a chance to talk about pharmacare, and there was a pediatric oncologist, a child's cancer doctor, who spoke of just how critically important this pharmacare program is. He talked about their inability to discharge patients from home because they knew they couldn't afford their cancer medications for their child. He had a phone call from a parent who said, this is remarkable news. They were going out, the husband and wife, as a result of this decision, we're gonna plan a dinner together, the two of them to celebrate. How many thousands of dollars this will save them, Mr. Speaker? Thank you. New question, the member from Nipissing? Good morning, Speaker. My question is to the Minister of Finance. All last week, we asked this government what they knew about the troubled, mortgage lender, home capital. We asked what the government's involvement was, what their intentions were, and quite frankly, who was asleep at the switch. The government provided no answers, choosing instead to ramble all about the federal regulator. Well, it seems the government did know more than they admitted, and in fact, they have inserted one of their own, Allen Hibbon, into home capital. Last week, we asked the government of home capital pass the smell test. So what's the liberal solution? Put another liberal insider in there and stir the pot. I asked the Minister, does this pass his party's standards for accountability and ethics? Question, thank you. Mr. Friends. Mr. Speaker, I find the line of questioning rather insulting given the fact that we have taken great pains to be transparent. These are operations and activities of independent agencies of government. They are not reporting to the government in any way possible. And Mr. Hibbon, to his credit, has sought advice to ensure from the integrity commissioner and the conflict of interest that he acts appropriately, given the fact that he did advise our government in other matters. So it's appropriate that this individual took that step. Furthermore, Mr. Speaker, he's a man of great integrity, excellent credentials, and I can appreciate now why an independent private organization is seeking his input as well. It is not a decision made by government and the member opposite knows that full well, and I frankly suggest again that he's being totally inappropriate in his questioning. Thank you. Supplementary. Thank you very much. Back to the minister who I also think is very inappropriate in his answers, Speaker, because we're not getting any answers. We've got a very troubling situation in Ontario with home capital under siege. While the government denied any connection last week, we now learn that they've placed their own liberal insider into this deal. Alan Hebbin, a key player in the Premier's Hydro 1 sell-off scheme, has been put on home capital's board. He is also one of the Premier's five appointees on OP Trust, which is the Ontario Public Service Employee Pension Plan. With this insider now in there, does the government plan on joining this game of off-scratch your back if you scratch mine? Speaker, why is the Premier's inside guy now inside home capital? Thank you. Minister of Finance. So, Mr. Speaker, it's very troubling indeed that this individual, this member from the Progressive Conservative Party, suggests that the government should intervene on the practices of private businesses, Mr. Speaker. The man of her opposite believes that private businesses should prevail and government should not interfere. That's exactly what's happening. But we are protecting the interests of investors and consumers. That is why the role of FISCO, the Financial Regulatory Authority of Ontario, has intervened and provided for enforcement. That is why the Ontario Securities Commission has acted accordingly. It is also why OSFY, which is regulating this federally run company, is involved, Mr. Speaker. The member opposite is making accusations and he's also presuming some form of conflict and Alan Hebbin has taken the appropriate steps to ensure that he's not doing so. Thank you. Any questions? The member from Oshawa. Thank you, Speaker. My question is to the Acting Premier. Steve Borders is a constituent of mine in Oshawa and he is a victim of the damage this Liberal government has done to our healthcare system. Steve tore his rotator cuff in December of 2016 and has been waiting for care ever since. He waited for an MRI. He waited to see a specialist and he's still waiting five months later to even confirm a date for his shoulder surgery. Steve has spent the past five months in relentless pain, unable to work, and wondering when our healthcare system will be there to help him. Steve wrecked his shoulder five months ago and still doesn't even have a date for surgery. Is the Premier okay with this being the reality of our healthcare system in Ontario? Thank you, Deputy Premier. Minister of Health and Long-Term Care. Minister of Health, Long-Term Care. Well, Mr. Speaker, regrettably, real life stories like this do occur, but it certainly isn't the case in the province where for whether it's access to MRIs or ultrasounds, where we are at the top or near the top in the country, or if it's access from a family doctor to a specialist where we are leading the country, or whether it is access from the specialist to the procedure that may or may not be required, we are leading the country again. The wait times in this province are the best or near the very best of all the provinces and territories across Canada. But, Mr. Speaker, it's these particular instances which drive us to continue, despite being the best or near the best in the country, it inspires us to continue making the right investments and I'm happy to speak to those in the supplementary. Thank you very much, Speaker. And to talk about best wait times, I'm sure that Steve would have different words to describe those wait times. But back to the acting premier. Hospitals are at capacity, patients are being treated in hallways, wait times are out of control, our healthcare system is frankly in a shambles and the premier is offering us a Band-Aid and I'll tell you, Speaker, Band-Aids won't fix Steve's shoulder. Steve's wife, Donna, told me, quote, Steve has not been able to pick up his granddaughter and play with her, which is all he wishes to do. He has been unable to do his everyday stuff like shovel the driveway and sidewalk, put deodorant on, or pull a t-shirt over his head, end quote. Speaker, this shouldn't be possible in Ontario, but it is happening all over the province. What do you have to say to Steve and anyone else in Ontario whose healthcare system has stopped supporting them? Mr. Speaker, I'm proud, which will be relevant to the member's own writing that we increased the operating budget, the base budget of Lakeridge Health, Mr. Speaker, by almost $7 million this year. Mr. Speaker, we are, as per my announcement that I made on Friday, investing more than half a billion dollars in our hospitals and in, Mr. Speaker, we're also investing over the next three years, importantly, which speaks to this question, investing $1.3 billion specifically aimed to further reduce those wait times. Those wait times, Mr. Speaker, as I referenced, are the best in the country already. That doesn't mean that they shouldn't be even shorter, but that's why we're making the kinds of investments, including $1.3 billion over the next three years, specifically for wait times. Thank you. New question? The member from Ottawa, Vanie. Thank you, Mr. Speaker. My question is for the Minister of Economic Development and Growth. Last week, this government took a great step and announced a balanced budget for 2017. Riding of Ottawa, Vanie, will benefit a lot from our investment in universal pharmacare for youth under 25 and the investment in our healthcare and hospitals. This budget was good news, but what are the additional benefits for Ontarians and for our economy? Minister, could you please enlighten this House about the state of our economy and what is going on with the balanced budget? Thank you. Minister of Economic Development and Growth. Thank you, Mr. Speaker. There's no question that eliminating the deficit is going to help our economy, and there's no question our strong economy made it possible for us to eliminate the deficit. We've created close to 700,000 net new jobs since the recession. That's 100,000 jobs in the last few months alone. We led the country in growth. In fact, we're leading the entire G7 and growth over the last three years. Well, Mr. Speaker, our unemployment rate last week reached a 16-year low. We have not had a lower unemployment rate since 2001. To put that in perspective, we haven't had a lower unemployment rate since Austin Matthews was in junior kindergarten. Tiger Woods was a good golfer. Wikipedia and iTunes were something that was just coming online. Mr. Speaker, you were in year two of an illustrious 18-year career here at Queen's Park, and congratulations. And, Mr. Speaker, the member for Niagara West, I believe, is turning three years old. Thank you, Mr. Speaker. You're better. Supplementary. Thank you, Mr. Minister. Thank you, Mr. Minister. Great leadership into protecting jobs in Ontario. It's great to hear that we've been creating all the necessary jobs for our economy to thrive, but the world is changing, and so is our economy. So the region of Ottawa is part of this change. We're making huge strides in the digital economy, including 5G networks, cybersecurity, and e-commerce, where we have companies like Shopify who are doing so well. So today, I think it's crucially important that we take steps to lead the economy of the future, and many people are feeling a bit anxious about what this means for them. They want certainly a digital transformation. They know it's happening on a global scale, but they want to know how Ontario is preparing for this. Minister, can you please tell us what the government is doing to ensure that we remain competitive? Thank you, Minister. Mr. Speaker, while it's nice to have the lowest unemployment rate in 16 years, and while it's nice to see the job growth happening in our economy, just because we're doing well today is no guarantee in this fast-changing competitive global economy that we're going to be doing well tomorrow. That's why I'm really proud that we're making significant investments in our business growth initiative. We're investing $50 million in the Vector Institute for Artificial Intelligence, $130 million going towards 5G technology, next-generation technologies, much of it in the members area of Ottawa, $80 million going towards the autonomous vehicle innovation network, again, much of it coming in Ottawa. Another $75 million will be going towards our initiative to advance supercomputing in this province in such areas as genomics and neuroscience. $20 million for quantum computing, Mr. Speaker. The fact is that making Ontario a leader in today's economy requires these investments. We're very, very proud of building that economy for the next generation. Thank you. Question to the member for Perry Salma Sculpa. Thank you, Mr. Speaker. My question is to the Minister of Northern Development and Mines. The Minister of Great Lakes, Graphite, and Matheson has announced it is moving to Pennsylvania. Speaker, can the Minister tell us why the company feels it is better to do business in Pennsylvania than in Ontario? Minister of Northern Development and Mines. Speaker, thank you to the member for the question. I'm not familiar with the decision by the company. I don't believe our ministry has been contacted by the particular company and given any reasons for their move. It could be in a variety of areas. I don't know. What I can tell you, Speaker, is that for a very long time, we have put programs in place that I would suggest are very supportive of the mining sector in the province of Ontario. And the most obvious example would be the new gold mine that has just opened four hours west of my home community of Thunder Bay. Speaker, there are obviously policies and programs and support mechanisms in place that are incenting mining investment in exploration and in extraction, Speaker. Or else a company as large as new gold would not have just recently opened their mine. 650 or so people on a construction site and about 450 that will be in place when the mine is open and operating. So clearly, Speaker, something is going on. Perhaps the member will in his supplementary explain some of the detail about why this particular company decided to move. Thank you. Thank you, Mr. Speaker. Why I'm surprised by the minister's response to that question. Just last July, the Northern Ontario Heritage Fund announced an investment of $412,000 in Great Lakes Graphite of Matheson. So this announced move to leave town comes less than 10 months after the government gave this company $400,000. Speaker, did the government not attach any requirements to the funding that the company remained in Ontario for a number of years? A blank check. Why was this company able to accept $400,000 of taxpayers money and then leave town? Well, he would. Mr. Speaker, I'm happy to circle back on the NOHFC piece and find out if there were any terms or conditions attached to the grant that was provided grant and or loan. I'm not sure which or both or sometimes through NOHFC. It's a combination of both, but I'm happy to circle back and find out what the terms and or conditions may have been associated with that loan. Speaker, but I would go back to the point to make simply that in Ontario, the mining sector is doing well. And in fact, as I've had the opportunity to say in this legislature speaker on more than a couple of occasions, the investment from net to see an activity in the province right now has seen an increase last year. So an increase this year and by the end of the year is expected to reach a very robust number. So in fact, Speaker, the mining sector is strong in the province. We're doing well. Investment is here. And in fact, on exploration alone, Ontario represents 25% of total exploration activity in the entire country. So something is going well. People are investing in the province and we look forward to more positive announcement in the weeks and months ahead. Thank you. A new question, the member from Kitchener Waterloo. Thank you very much, Mr. Speaker. My question is to the acting premier. My office has been working with Jim Brown and his family since March to reunite him with his wife. They were separated when Colleen Brown was admitted to Sunnyside long-term care in February due to Alzheimer's Diagnosis. Jim remains on a waiting list separated from his partner of 40 years. The waiting list for long-term care beds in Waterloo region alone is 2,600 people. And in order to get on the crisis list, Jim and his family have been told that they have to apply to many care facilities. If Jim was placed in a different home, it might even take longer to reunite the couple. Speaker, the family says that to live with your loved one is to live with dignity. Why doesn't this government believe that seniors in Ontario should be able to live in dignity? Thank you. Dr. Kinger? Chair of Health and Long-Term Care. Chair of Health, Long-Term Care. Well, Mr. Speaker, I'd be happy to speak with the member opposite about this specific individual, this couple, because I think if she were to look behind her and to the left, there's an example in her caucus of a very collaborative relationship where a couple were faced with a similar challenge of reunification with regards to long-term care homes. And we were successful in resolving that. Mr. Speaker, it is regrettable and unfortunate and often unnecessary that the couple should be split up when one of them requires long-term care and there's an effort being made to reunite. I'd be happy to work with the member opposite to resolve this, as I have on several other occasions. Thank you. Supplementary? So I think the minister just said that I have to bring a question to the legislature in order to ensure that senior couples can actually spend time in a long-term care facility. Speaker, Jim's family ha... Order. Order. Finish, please. Thank you very much. Speaker, Jim's family have tried contacting the Minister of Health, but they haven't received a response. The CCAC response was downright confusing. And over the last 14 years of this Liberal government, the waiting list for long-term beds in Ontario has grown to 25,000 people. And nothing in your budget will get those people into the care that they need. Today, Jim is on a crisis waiting list in Waterloo Wellington region, but he and Colleen remain separated and their family remains worried. They describe the situation as cruel. Speaker, can the Premier explain why this Liberal government doesn't have a plan to ensure that Ontario seniors get the long-term care that they need and that they deserve? Thank you. Minister. Well, Mr. Speaker, just to clarify, I wasn't suggesting that the member opposite to get action needed to come to this legislature and talk about a situation. In fact, it was her decision to avoid speaking with me and to bring it here to the legislature and politicize it, Mr. Speaker. And many other people, many other people in this legislature, probably the majority, know that I work extremely hard in a collaborative way, no partisanship involved. In this case, I have a third decision, but it doesn't detract, Mr. Speaker, from my efforts to try to resolve it. And we've increased, by the way, in the long-term care budget in this budget that was delivered two weeks ago, Mr. Speaker. We're increasing the long-term care budget by 2% for the investment in that. We've created more than 10,000 more beds since coming into office, and we're redeveloping 30,000. I'm happy to work with her whether she wants to work with me or not. Thank you. Coursing the member from Bering. Thank you, Speaker. My question is to the Minister of Reconciliation and Indigenous Relations. Our government is committed to improving the quality of life-developing partnerships and expanding opportunities in the Indigenous communities. That's why we continue to work with the Indigenous leadership in a spirit of collaboration and mutual respect to create prosperous, healthy, and strong communities. Ontario's balanced 2017 budget is a reflection of this commitment. We want to improve outcomes by achieving real progress in developing strategic integrated investments and initiatives across government for the First Nations, Métis, Inuit, and urban Indigenous peoples. Can the Minister please elaborate how the provincial 2017 budget supports Indigenous communities in Ontario? Question. Thank you, Minister of Indigenous Relations and Reconciliation. Thank you, Speaker. Speaker, we remain committed to a strong relationship with Indigenous communities in Ontario. And this is supported by the strategic funding we make as a government. And in the budget announcement last week, we announced that we are enhancing Indigenous education in Ontario. Specifically, we plan to spend over $200 million over three years for more First Nation, Métis, and Inuit learners' access to high-quality, post-secondary education and training opportunities. Speaker, the Indigenous community knows that education often guarantees the future. So this government is committed to improving Indigenous education in the province, to closing the achievement gap between Indigenous and non-Indigenous students. That's why we will continue to invest in Indigenous higher education and learning opportunities. Thank you. Thank you, supplementary. Thank you, Speaker. I'm glad to hear that our government is investing in Indigenous students and their futures. Through working in partnership, we can see that the real progress is beginning to happen. Although there is much work left to do, I'm encouraged to know that this government is taking the necessary steps to close the achievement gap. This is in accordance with the truth and reconciliation commission calls to action in regards to Indigenous education. Mr. Speaker, can the minister please elaborate on the details of how and where this funding will be used? Thank you, minister. Speaker, specifically, $26 million of this funding will be to enhance the capacity and sustainability of Ontario's nine publicly funded Aboriginal institutes. For instance, the Aboriginal Institute at Six Nations Polytechnique has its own programs, but it also has bridging programs that enables the students to move from the Polytechnique to community colleges and to universities. We remain committed until the education achievement gap between Indigenous and non-Indigenous students is no longer a reality. From the Winnebago Health Authority to Fort Williams First Nations to Sudbury to Sioux Lookout, Thunder Bay and North Bay, we remain committed to funding to help Indigenous communities in the educational opportunities in Ontario. This budget goes beyond education to invest in health and wellbeing of Ontario, it is proving an excellent opportunity. Thank you. You have a question to the members from Stonehawk, Dundas, South Banguari. Thank you, Speaker, to the Minister of Education. Speaker, I want to thank the minister for coming out to Merrickville on their educational review panel on Friday night. But participants from my riding left disappointed with their warden stating it was simply too little, too late. Here is just one of the quotes from a student who was affected by the closure. I will now have to go to a school where I know nobody and I have to travel an extra 30 minutes by bus. I will lose most of my friends due to them changing school boards and I will lose great connections with my teachers. Speaker, in Alexandria we have five schools, all less than 50% capacity. Elementary and kindergarten students in my riding will spend over an hour on the bus and drive by all those five schools to get to theirs another 20 minutes away. So is the answer to close the mall and bus all the students out of the community or is it to impose a moratorium on school closures until a full comprehensive study on education is complete? Thank you, Speaker. I want to thank the member opposite for the question and I want to thank all of those who came out to the first set of consultations that were held on Friday and this is an engagement process, Mr. Speaker, that is designed so that we can listen to rural and remote Ontario and the question we're asking is how do we support our students and make education even better, Mr. Speaker? This is not about a moratorium, Mr. Speaker. We know that school boards have the opportunity that they can make decisions at the local level that is in the best interests of their students. If they feel that they need to take a pause on a particular project, they can do that. That's exactly what happened in Marksdale, Mr. Speaker, where they brought the community together to talk about how to design a community hub and they're having those conversations, Mr. Speaker. So there's nothing stopping school boards and their communities from doing that. What this engagement process is about, how do we improve education outcomes for students in rural Ontario? We heard some fantastic ideas, Mr. Speaker, and we're going to continue with these consultations. Supplementary, the member from Bruce Gray, Owen Sound. Mr. Speaker, my question is also to the Education Minister. Two reports from the People for Education and Ontario Alliance Against School Closures show your government is hauling out schools across rural Ontario. Schools like Chesley District Community, which has rock solid academic showings and strong roots in the community. Sad how you have no money to keep schools open, but we're quick to find money to cancel two gas plants for 1.1 billion and waste 8 billion on e-health consultants with nothing to show for it. Minister, you and the Premier told in terms of no uncertain terms to trust you with their education and their schools. But after you put your party back in power, you and your Premier turned your back on them, presiding over the largest wave of school closings in Ontario's history. In terms of never felt more cheated on their behalf, I ask you, Minister, are you and your Premier ideologs or are you actually ready to change your mind about an issue when it's the right thing to do, which is to stop school closures across rural Ontario? Thank you. Thank you. Thank you. Minister. Well, Mr. Speaker, you know, in the member's own writing, there's a good example of a school board that has taken a pause, Mark Dale, and is working with the local community to design a community hub. So I'm sure he wants that initiative to go forward. The member from Bruce Greyhound Sound, the member from Elgin, Middlesex, London, the member from Niagara, West Blamble will come to order. Mr. Speaker, you know, we understand that these are difficult decisions. I have spoken to students at Chesley, Mr. Speaker, because their school is moving the high school students out to three available high schools that are within 15 minutes around that local school and turning that particular school into a K-8 school for elementary students, Mr. Speaker. These are the local decisions that boards have to make. They're doing them very mindful of the outcomes that are beneficial for students. Thank you. New question, the member from London, West. Thank you, Speaker. My question is to the acting Premier. Maria Van Bergsteden and her daughter Julia live in London. They are excited that Julia, a straight A student, will be starting university in the fall, but they are also worried about the almost $9,000 in fees and tuition that Julia will have to pay. Like many Ontarians, Maria is a single mother who works contract to contract with an annual average income of less than $45,000. This past year, Maria secured a contract that offered pay and lieu of benefits, pushing her income to just over $50,000. When Maria and Julia applied for the liberal version of free tuition, they were shocked to learn that Julia was only eligible for a $3,000 grant, in other words $6,000 less than Julia's actual tuition costs. Speaker, can the acting Premier explain why her liberal government is telling Maria and Julia and other Ontarians that tuition is free when in fact it is anything but? Thank you. Thank you. Well, Speaker, I'm very grateful for this question. I can't speak to that particular case, but would be very happy to look into it, Speaker. What I can tell you, though, is over 200,000 students will be receiving grants that are greater than is free tuition. I urge people to look at the calculator online. We've made it very easy for people to estimate how much aid they will be able to get at ontario.ca slash osap. You answer a few questions and you learn how much aid there is to get, Speaker. And I look forward to the supplementary because this is a very progressive, transformative initiative, and people need to know about it. Here, here. Supplementary. Speaker, young people like Julia shouldn't have to take on a huge debt in order to get an education and build their future. Even though Julia will be living at home while she is at university, money is tight, making it difficult to cover tuition, mandatory student fees, and textbooks. OSAP has offered a $9,000 loan, but Julia is worried about having to repay a debt that could amount to $36,000 after four years. Does the Premier think it is okay to saddle young people like Julia with such massive student loans? Free-ish. Thank you, Minister. Well, Speaker, let me repeat. People could go online. Students in grade seven, grade eight, grade 12, Speaker, they can go online and see how much aid there is available. I'm not sure what the NDP policy is, Speaker, but I can tell you what ours is. Ours is that we have removed financial barriers to students across this province. It doesn't matter how old you are, it doesn't matter how many years out of high school you've been, we're there to help, Speaker. The new deal for students is you do the work, you get the marks, you get accepted, and we will make sure that finances never stand in the way of your success. Very, very good. Thank you. You have a question. I'm going to ask you a question. Well, thank you, Speaker. Speaker, my question is for the minister responsible for accessibility. Minister, during our constituency week, a couple of weeks ago, I met with a few groups that shared with me some of the challenges in barriers, people with disabilities. In my communities are facing. Despite being willing and able to work, people with disabilities continue to face multiple barriers to employment. The employment rate for people with disabilities less than 50%, and a quarter of those employed feel they are working in a role that did not reflect the breadth of their qualification. By removing barriers in Ontario, we foster a culture of inclusion, increasing participation in our communities and workforce, and creating a society where everyone has the opportunity to reach their full potential. Speaker, could the minister explain what our government is doing to remove barriers to employment for people with disabilities? Oh, great question. Thank you. Minister? I thank the member from Northumberland, Quinty West for this very important question on accessibility and employment in Ontario. We know that improving employment opportunities and outcomes for people with disabilities will help build Ontario up for everyone. And we remain committed to our goal of making Ontario accessible by 2025. And that's why we created the AODA Employment Standard. I was actually on that standard committee years before we became a politician speaker. It's a very important standard to help organizations meet their obligations and to proactively remove barriers. We recognize, Speaker, that achieving accessibility means taking very concrete steps to support full participation of persons with disabilities. And that's why, in last year's budget, in addition to the standard, our government made a commitment to create an employment strategy for people with disabilities. Happy to talk about that more in the supplementary. Thank you. The supplementary. Thank you. Well, Speaker, I want to thank the minister for incredible work towards making an accessible Ontario. People of all abilities deserve to reach their social and economic potential by contributing the diverse skills and talents in the workplace. Unfortunately, many Ontario employers are reluctant to hire people with disabilities and yet nearly a third of Ontario's small and medium-sized businesses report having difficulty filling jobs vacancies. Despite this, studies show the workers with disabilities are more loyal, have better attendance and perform better than average on the job. As well, most workers with disabilities only require minor accommodation to work. A more diverse workforce includes people with disabilities will help Ontario business increase their productivity, innovation and exports, making them more competitive. Minister, what steps is your minister taking to shift attitudes about accessibility and increase the participation of persons with disabilities? Minister of Government Services and Minister of Responsible Accessibility. Thanks again, Speaker. So the employment standard provides a baseline of accessibility and employment practices right from recruitment, getting that first step in the door through career development. But we know there's more to do, Speaker. So our employment strategy will establish a cohesive, made in Ontario vision to ensure in terms of access to a continuum of employment and transition and training services. It will streamline employment services to recognize unique needs and employment goals of each individual. I've been working very closely with a number of partner ministries on this and will engage employers to be active partners in breaking down barriers, promoting an inclusive workforce by shifting attitude speaker and dispelling misconceptions. I'm very proud of the work that we are doing for accessibility. And I'll continue to seek ways to break down barriers to make Ontario accessible by 2025. Thank you. Do you have questions for the member from Leeds Granville? Thanks, Speaker. My question is for the Minister of Education. Speaker, I want to thank the Minister for coming to Merrickville in Leeds Granville on Friday. Parents, municipal leaders in my riding and the member for Stormont Dundas and Sogling Garries told her clearly why the school closure process they've just gone through is a disgrace. But they want to fix it. And they have one request that all the school closures be put on hold until an all-party review develops a new process. One parent stated, the only way we can have faith the minister is listening is if she agrees to a moratorium. Speaker, would the minister put a moratorium in place that includes schools under the threat of closure? Yes or no? Good question. Thank you. Minister of Infrastructure, come to order, please. Minister of Education. Thank you, Speaker. And I too want to thank the member opposite for the question and also for attending the consultation that was held in Merrickville on Friday evening. Mr. Speaker, the consultations and engagement processes that have begun in rural Ontario and remote communities in Ontario are designed to ask the question, how do we improve education for rural and remote communities? Are there creative ideas and solutions that we need to consider to make those types of enhancements? And that's exactly the conversation that we're engaged in, Mr. Speaker. It does not mean that we can't move forward with decisions that school boards are making locally because they are doing that with the framework that they want to ensure the best outcomes for students in their communities, Mr. Speaker. And that is happening. We know those are very difficult conversations, they're difficult decisions, but they're all being made with the view to improving education outcomes for students in rural communities. Thanks, Speaker, back to the minister. Unfortunately, what we just heard sounded a lot like the minister's words on Friday night. She said a lot, but ignored the real issue that matters. The 12 schools, the 12 Upper Canada schools that this government wants to close starting next month. For these schools and these communities, there is no tomorrow. As one parent told the minister, and I quote, we can't do better next time, we have to do better now. Doing better means giving these schools and communities a second chance to show why rural and small schools matter. Again, Speaker, parents and municipal leaders deserve an honest yes or no answer to the question that they asked repeatedly on Friday night. Will the minister agree to a moratorium and will she do it today? Excellent. Thank you. Mr. Speaker, of course our schools matter and every student deserves the best education possible in Ontario, Mr. Speaker. That's why we're engaged in these conversations so we can talk about the creative solutions that can improve education for rural and remote communities. For instance, Mr. Speaker, having the opportunity for two school boards to come together and to talk about joint use. We're seeing where that's creating enormous benefits, improving facilities, broadening the programming options for students, having more extracurricular activities, Mr. Speaker. It is this coming together and the utilization of shared space that has that possibility for better programming. We're seeing that right across, Mr. Speaker, as boards come together, as communities and boards come together and ensuring that the conversation that we're having is one about what are the best possible outcomes for students. And I would absolutely encourage that member opposite to continue to have that dialogue with their local school board trustees because that's the question that we're focused on here on this side of the house. The question, the member from Windsor to come see. Speaker, my question is to the deputy premier, good morning. Speaker, about 400 homes for low to moderate income families will close this year because Toronto community housing doesn't have enough money to fix them. About 1,000 homes will have to be closed by next year. The city of Toronto has a plan to save these homes and the money to pay a third of the cost. Ottawa will put up another third. Toronto's mayor has asked the premier to pay the remaining third, but Speaker, the premier said no. Why won't the wind liberals give the city of Toronto what it needs to help save these homes? Thank you, Mr. Speaker. Minister of Housing. Minister of Housing. Well, thank you, Speaker. I just want to go on the record and say that, you know, over the next three years, Ontario will be investing $2 billion in affordable and sustainable housing across Ontario. $2 billion, Mr. Speaker. You know, and having the federal government at the table is very important. Finish, please. Speaker, having the federal government at the table is very important, and we certainly welcome their commitment of $11 billion over 11 years, divided among the 13 provinces and territories. Our government has increased funding, Speaker, year over year, showing our commitment to building a fair society where everyone benefits, and in the supplementary, I'll be delighted to talk about that more. Thank you, supplementary. Well, social housing used to be a provincial responsibility. Mike Harris and the Conservatives downloaded it onto the municipal tax base. The Liberals have been in power for 14 years, and in 2013, the Premier cut $129 million in annual funding to Toronto's social housing program. Speaker, it's cheaper to repair existing homes than build new ones. That's why we in the NDP have pledged to pay the one-third provincial share when we form government. Why won't the Liberals undo the damage that their cuts to social housing have done to Toronto's struggling families? Thank you. Well, thank you, Speaker, and I'm very happy to highlight all of the amazing funding that this province has put into Toronto. I can tell you, we've made these investments, Speaker, $340 million into Toronto for homelessness prevention to help Toronto's most vulnerable residents, $130 million to expand affordable housing, Mr. Speaker, so that every Ontarian has an affordable place to call home, and provincial land, as announced in the budget, Mr. Speaker, provincial land in Toronto alone, worth up to $100 million to build new affordable rental units. The list goes on, Speaker, this year alone, Speaker, Ontario contributed $43 million to the City of Toronto for repairs and retrofits to social housing. That expansion included an increased funding for Toronto, reaching over $117 million annual by 2019. As I said at the beginning. Pursuant to Standing Order 38A, the member from Dufferin-Kellenden has given a notice of her dissatisfaction to the answer to her question given by the Minister of Children and Youth Services concerning purchase of coats for staff. This matter will be debated Tuesday at 6 p.m. The member from Stormont, Dundas and Oakland carry out a point of order. I think you're in point of order. I know that the member from Algin, Middlesex, has signed a message. I've noticed that his wife, Jen, is here for the meeting. The Minister of Indigenous Relations and Reconciliation. On a point of order, Speaker, I'd like to correct my record. In my answer on the supplementary question, I said $26 million was being invested in nine aboriginal institutes. The correct amount I misspoke is $56 million. I want to offer the member from Algin, Middlesex, London good luck this afternoon. That's all I have to say. There are no deferred votes. This house stands recessed until 1 p.m. this afternoon.


If you get an acute pain, you know, you put your hand on a match, on a hot stove, it hurts like the blazes. What do you do? You get cold water, you get some butter. It's relatively short-lasting. There are kinds of pains that are not. Our job is really to educate and to prevent this problem from escalating. Once a person starts with opioids and there is a high from it, addiction is produced and very, very quickly. And the person does not have control. People need to be able to get into treatment as soon as they decide that that's the best option for them. Having a waiting period is really harmful to their health. We know addiction is a disease. It's something that recurs. The drug hijacks the brain. It's a vicious cycle.


Okay, it looks like we're at 130, can you all hear me? Okay, cool, so maybe, well, who am I? I'm John Billings, I've been working at Yelp for almost five years, and during this time I've done a bunch of work on our service-oriented architecture, so splitting out our monolith into a bunch of different services, and I've done a lot of advising different teams how to do this, and so Swagger has formed an important part of this process. So, just a little bit about Yelp. What we do is we connect people with great local businesses and some statistics. As of the end of Q3 2015, we have about 89 million unique monthly visitors via mobile, and more than 90 million reviews contributed since the beginning of the company, and about 71% of all searches now come from mobile, both web and app, and we're present in 32 countries. So, HTTP JSON is amazing. There's a unicorn, a very happy unicorn. There's so much supporting infrastructure. If you're in Java land, then there are frameworks like DropWizard, or if you are in Python land, so I'm familiar with Python Java, so there's HTTP lib, there's simple JSON for doing JSON decoding, you've got frameworks like Pyramid, and then at the infrastructure level, you've got things like Varnish to do your HTTP caching, you've got HA proxy, and Nginx to do load bouncing, and both of those have good layer seven support for doing nice things with HTTP, and you've got Apache for actually serving up things, and then for debugging, you can use things like Curl and JQ. So this is great, so much support. But if you look carefully, the unicorn's actually crying. Why is this? Why is the unicorn so sad when everything is so great? Well, here is a mythical situation that has never happened to any of us, right? The website is down again. Why is that? Oh, I just pushed the Pet Store service. So the Pet resource, it takes a string, right? Like, I passed it a string. No, no, it's an integer, right? So there's confusion over this API.  So if only there were a better way to specify our API. So we do actually have a few options. I'm gonna walk through some of them. So you can write specification documents, and here's an example of a spec doc for the Pet Store service. And just in case you don't know, the Pet Store service is kind of, is an example crud web app where you can kind of post new pets, you can search for pets, you can kind of download pet information. And so this could be an endpoint for the Pet Store app. And you see there are some attributes and some required or optional and some descriptions over what each one of those means. And then there's a response and an array of pet objects defined below. So, pros and cons. So it's really easy to get started with this. And this is what we did at the beginning when we were breaking out our services. And if you use something like Google Docs with commenting, then people can just look at browse those, during review time and leave comments, and you can very quickly iterate. And if you're not completely technical, so you're a PM, then you can also look at those and try and sort of figure out what's happening. But it's not all great because certainly the implementation and the specification can drift over time. There's nothing actually keeping them in sync. Maybe at the beginning they are in sync, but then some people add some new endpoints, change some parameters. And after a few months, the spec. really doesn't reflect reality at all. And it's also really easy to be imprecise because this is just written pros. There's nothing forcing you to actually specify how things are. So another option is you could use an IDL, an interface definition language, like thrift or protocol buffers or Avro. And here's an example of a very simple multiplication service defined in thrift. And you see it looks very IDL-y. There's a multiply function. It takes two ints, returns another int. So what's good about this? Well, it can be very efficient on the wire. Because you're using an IDL behind the scenes, you really can really compress things on the wire. And it's really efficient to decode. So we certainly have situations where you send, I don't know, 10 megs of JSON and it takes Python services, 100 milliseconds to decode that. And there's not much we can do to speed that up. Whereas if we use thrift, I think it's probably gonna be more efficient doing that. But there are some downsides. So you cannot use nice layer seven technologies such as HTTP caching. That's out, we're just at TCP now. It's difficult but not impossible to debug on the wire. And the quality of support for some of these IDLs can be a bit variable. It really does depend, especially if you're using a less well-supported language. Another option is to write lots of integration tests between your clients and your servers. And then effectively the tests actually become the specification. And you're basically saying something like, as a client, if I send this request to the service, then I should get back this response. So what's good about this? So you should hopefully be doing a little bit of integration testing already so that you learn about errors before you hit production. But it's not all good because integration testing is pretty much at the tip of the testing pyramid. You hopefully just have a few integration tests and they can take a long time to run because you may have to spin up some databases, spin up some services. It all takes time to do this. So the iteration speed is very slow. So ideally you wanna find bugs before this point. Another alternative is you can write client libraries. So you hand your clients just a library in whatever language they're using and they just talk to that library and then behind the scenes the library actually does all the communication on the wire. So what's good? It's a black box of the client lib. Consumers really don't need to worry about what's happening there. And from our own experience at Yale, we have actually done this and it can work. But there are still disadvantages here. If you're writing the client lib, then there's lots of boilerplate, sort of code that doesn't really add anything, you just need to put it in there.  And you still haven't got the specification for the wire protocol. You're not actually forced to write that down at all. And so you probably also still need some integration tests as well between the client lib and the service. Okay, or is there another way? So we could stick with our existing HTTP and JSON infrastructure. We could then just maybe, maybe we could invent a machine readable specification language to declaratively specify what our endpoints and what our return types look like. Maybe you can see how I'm going with this. And then we could create a whole bunch of tooling to actually generate client libraries from these specifications of our endpoints. And then we could also create some tooling to perform server-side validation against these specifications. So are people sending us the right things? Are we returning the right things back from our server? And then maybe we could also create a really vibrant open source community around all of this. But what am I talking about? So I'm talking about Swagger here. And there is a URL there if you want to look at the Swagger spec. And now what I'm gonna do is I'm just gonna walk you through Swagger. So the history of Swagger. It's been around since around 2011. That's when version one was released. And there have been a few different versions since then. I think in version 1.2, they actually formally specified the Swagger specification language. And then version two, which was a moderately big change, was released in 2014. And that kind of got rid of a few of the pain points. And then just this year, it was renamed to the open API specification. And it's supported by Google, Microsoft, IBM, and a few other companies now. So here is the Pet Store API. And you can actually try out hitting this endpoint. So if you curl it, and you specify an ID, so 42 of a pet, and then pipe it through JQ just to format it nicely, then you get back this response. It tells you the ID of the pet in the category, the name of the pet, some URLs, and some tags and status. So this, for our services at Yelp, we do things that look a little bit similar to this. This isn't completely strange as a response from a service. And there's quite a lot of structure there. And as a result, it's quite easy to get something wrong when you're dealing with objects like this. So what would a swagger specification look like for this? So there's actually a full spec at the URL at the bottom of the slide if you want to take a look at it. But what does the swagger spec say? Well, it says it's version 2.0, and there's a description and an opaque version string and a title. And then the important things are these path objects and definition objects. That's basically where the meat of it happens. So I'm going to talk about path objects and definition objects in turn. So a path object for the endpoint that we just saw. So you see there's a path slash pet, and then this path parameter, which is pet ID. And if you look down, you can see this pet ID path parameter is bound in the parameter section, name pet ID, and it's in the path. And then there's this description. And we see it's required. What type is it? Well, it's an integer, and there's this format, which is in 64. And I'm going to talk a little bit about types and formats later. What choices you have there. And then there's this response type at the bottom. And you can specify response types for both success cases and also error cases. I'm just showing a success case here. So if you get a 200, it's a successful operation, and we return this pet object, which lives in the definitions section. And so this is just a reference. And the nice thing about Swagger is you can actually split these definitions out across different files, which can help keep it dry. So here's an example of another parameter object. It's not used in the example I just gave you, but it's used in the find by status endpoint. So what is this? Now we're saying it's a query parameter, and the name is status, and it's required, and it's an array, and the array contains strings, and these strings range over available, pending, or sold, and default is available. And so this is pretty powerful. We've got an enum type here, and we're actually gonna be able to check that people are passing in the right enum values. So let's continue with our getPet by ID. So this response type, which is here on the right, I've given you the spec for it on the left. And so you can see that there are a couple of required fields, and then there are a whole bunch of kind of required optional fields defined below. So there's ID, there's category, there's name, there's photo URLs, tags, status. And so this kind of makes sense, and I think hopefully you can see how this all matches up. What else can you specify in Swagger? Well, quite a common idiom is to return a map from strings to something else, and as we were retrofitting Swagger specs to our services, we kept hitting this case. And in Swagger 2 and beyond, you can actually define these very easily. And so here are a couple of examples. So a string to string map, you just say the type is objects and additional properties are type string. And you can actually change the type so you can have a string to a foo map if you've defined a foo object, and that just works. So what are these data types and formats? Well, your types, they range over integers, numbers, strings, and booleans. And then the format basically allows you to put a little bit more structure in the type. So you've got int 32 and int 64 for your integers, and then you've got things like dates and date times for your strings. So Swagger will actually check, if you specify date time as a format, it'll check that you really do have a date time there. But you can also have custom formats, and this is where it gets really powerful. So if you specify a format that Swagger doesn't know about, well, Swagger will kind of ignore it, but maybe in your framework, you've registered a validator for your email addresses or IPv6 addresses, and you can check that the strings are of that format. And we've actually done that quite a few times at Yelp just to provide additional validation. So you've got a Swagger spec for a service. Where are you gonna put it? So Yelp, we check them into the service code base. Why do we do this? Because it basically minimizes distance between the spec and the code. You've got some other choices. You could actually put specs in a single central repo if you want it. We haven't done that, but it could work. So modifying Swagger specs. So there really is no magic here. Currently, Swagger will not prevent you from doing something really bad. You need to make sure that all your changes are backwards compatible. If you like living safely, then just add new endpoints. Or if you like living dangerously, then go ahead, change some existing endpoints or remove some endpoints. Bad things could happen. There'd be dragons. I wouldn't recommend that path. So a brief interlude. What's the best thing about UDP jokes? Anyone? I don't care if you get them. What's the best thing about TCP jokes? I get to keep telling them until you get them. No, I'm not actually gonna keep doing this. Okay, so you've got a Swagger spec. What can you do with it? There are several different things you can do with it. You can review the spec. Or you can aggregate all the specs across your organization into a single location so everyone can browse them. Or you can generate a client library. Or you can perform some server-side validation. Or you can do some testing. And I'm gonna talk about each of those now. So API reviews. So here's an example of review board. We use this at Yelp. And here's a Swagger spec that we've just opened up a comment on during review. So you really can provide a lot of feedback at this stage. And quite often we do reviews for the spec first and then we do the code reviews. And so this just looks like regular code review which everyone should hopefully be used to. So browsing specifications. So at Yelp we use a slightly modified form of the open source Swagger UI tooling. And on the right hand side you can see a bunch of different services. Kind of blurred out just because I don't wanna show you all the services that we use internally at Yelp. And so you can select any one of those services and then you get the API for the service in the main kind of section there. And this actually integrates with our service discovery system so that when you actually deploy a new service with a Swagger spec it just automatically turns up here. So developers don't actually need to do any additional work if they've got a Swagger spec. So in the Swagger UI, you can browse all of these endpoints and you can see the schema, it's great. But you can also perform real queries because this ties into dev versions of our services. So you can go ahead and put ID one for photo IDs and then you can hit that try it out button. And it will actually go ahead perform that request and give you a response. So this is incredibly powerful. You've got all of these services and you can interactively play with them from a single UI. And PMs love this, right? If devs been working on a service they can go ahead and actually try the service. They don't need to understand Curl or JQ or know about the kind of complicated URL structure. This just works. So brief aside, how does Swagger UI work? Well, suppose you have a host which actually hosts the JSON, the JavaScript and HTML and your browser downloads Swagger UI from that host. Well, same origin policy basically says in your browser that you can only communicate with the host which you downloaded that JavaScript from. But there's a problem because we actually want to go and hit the Swagger endpoints of all our services but we're not allowed to do that. So how do we get round this? You can use cross origin resource sharing where your services actually return a header which specify who can access them. And we thought about doing this at Yelp but it's really quite invasive if you have to modify all your services to return these additional headers. And so we got around that by using trustee nginx. So nginx just sits there and it proxies all the requests both to get the Swagger UI and also to get the Swagger content from the services. And so it just sits down a network and your browser just thinks it's always communicating with nginx. So this is just something to be aware of if you want to deploy Swagger UI. So we have a Swagger spec for a service. Let's generate a client library. So here's an example of doing that. You can run this code yourself if you want. You curl this jar, download it and then you just run it with this generate parameter and you specify what language I'm doing Python here. And then you specify a URL the dash i option where you can find the Swagger spec for the service and then you say output into the client lib directory and you run that and it will just generate to you a client library just like that. And then suppose we have this client library now how do we use it? Well this is Python but it would work with Java as well or any other supported language. So you import the API client you import pet API which is defined in the Swagger spec and you construct your client and then you basically pass it into your pet API object and you just say get pet by ID of 42 and it goes off and fetches the response for that and validates it. So this again this is really powerful. We didn't have to write any of the boilerplate behind this. We don't have to write any validation code. This just works. But for Python you can actually go a little further. So Python supports dynamic generation of classes so at runtime. So at Yelp we wrote this bravado dynamic client lib thing for Python and you don't actually have to do that kind of two phase you know fetch the spec generate Python code and load the Python code and run it. You can all just do it in one step. So this becomes really powerful because you can interactively discover and browse your endpoints and you see here that in just I guess three lines you can actually fetch the spec and then you can just invoke the spec just like that and you get back the same response we saw before basically but now it's actually it's an object so it's presumably there's a little bit of typing here as well. So something else is validation in your service. Here's a project for the Python pyramid web app framework. Again there's similar things for Java or whatever language you're using and Pyramid Swagger so we wrote this at Yelp it supports several different Swagger versions it does validation both coming into your service and also going out of your service. And it also has a few facilities for interacting with Swagger UI. So let's just walk through an example. What do you do here? Well you add your route as you normally do in these sorts of frameworks and what Pyramid Swagger does is it actually checks in the Swagger spec that your URL is really there and then when you're writing your handler code so at the bottom of the slide you then have access to this Swagger data dictionary on your request and that contains all of your validated data that's come in. Pyramid Swagger supports those custom formats that I was talking about. So suppose for some reason you wanted your pet IDs to be base 64 encoded on the wire. Now Swagger doesn't natively support this but what you can do is you can register this validator and then whenever Pyramid Swagger sees a base 64 thing on the wire it can automatically decode it and then it can encode going back out and here we see also there's validation which is just try doing a base 64 decoding. So let's see an example of Pyramid Swagger catching an error. So here we're hitting that endpoint that we saw before but now we're using the string 42 instead of an integer and Pyramid Swagger before this even gets into your service it realizes that this string is not an integer and it throws an error for you. So it actually says 42 is not a type integer and it says what it should be. So that's very powerful. We didn't have to write any of this code. Pyramid Swagger just did it for us. Or maybe in your pet store code you've got this getPet function.  This isn't what you'd actually do it's just a kind of minimal example but maybe for the ID we return we make a mistake and we put a string there instead of an integer. It's a very easy mistake to make and you wouldn't necessarily immediately catch this error if you were doing something like testing or code review but you need to really exercise the right things here. But what does Pyramid Swagger do? Well when you try and return it it says this ID really should be an integer and there's been an error so it catches it on the way out. So if you just made a few example requests to your service during testing you could pretty quickly check that you're doing the right thing because if you're returning things of the wrong type then you're gonna get an error like this. So let's talk about testing, testing. So here's the situation if you're not using Swagger. So assuming you are using a client library you've got two interfaces. You've got your client to client lib interface which is presumably within a single address space on a single machine and then you've got your client library to service interface which is presumably gonna cross the wire and in each of these interfaces there could be inconsistencies and we've seen some examples of inconsistencies before. What does the situation with Swagger look like? Well you've got your client to client lib interface before but you've also, you can imagine your Swagger spec living on the wire almost just checking things as they pass to and from the service. It doesn't actually live there but it's a useful mental model. So our generated client lib is automatically consistent with the Swagger spec almost by construction. Providing there are no bugs in client lib generation and also providing you don't go changing the Swagger spec but we'll just kind of not think about that for now. And then you've got your Swagger spec to service interface. So let's look at the client to client lib interface. So this is a fairly standard testing problem. You're using a third party library. You wanna check that you are conforming to its interface and so what do you do? Well you can mock out some return types perhaps and your type checker can probably help here if you're living in a typed language. So what would be really nice for Swagger would be if it actually supported kind of running in testing mode so you could say to your client lib, hey I don't actually want you to make requests on the wire but when a request comes in for this endpoint please return this data. So it doesn't currently support that but hopefully that will happen sometime soon. And then we have the Swagger spec to service interface. So as part of your testing, given you've got a Swagger spec you could use an external validator just to check your requests and your responses are consistent with the spec or if you're using something like Pyramid Swagger well that's already kind of built in so just fire some requests at your service and it'll tell you if you're violating the spec. What else is there? So there's Swagger Hub which is a pretty new service online by SmartBear and here you can actually enter your Swagger specs and straight away see the documentation for them and on the right hand side you can also generate client and server implementations and just download them. So you don't really have to download any of that tooling. It'll do that stuff for you. And you can also share your specs between other collaborators. So this is pretty exciting because it's kind of like GitHub for Swagger and I can see this becoming a very easy way of collaborating on APIs. So Swagger isn't the only way of specifying your HTTP JSON interfaces. There are a few other languages for doing this. One is API Blueprint by Apiri and the nice thing about this is it's kind of designed to be more human readable and behind the scenes actually gets compiled into something a little bit similar to Swagger. So here's just an example of a pet store like Interface. I haven't used this but it is an option out there and another option is Iodox by Mashery and this looks very similar I think to Swagger and you can see it's just specifying an end point, a get endpoint. So conclusions. So Swagger provides a really easy way to define JSON HTTP interfaces both for new services and also retrofitting onto existing services. Once you have an interface you get a whole lot of tooling for free. The cost of entry is that you write your of Swagger specs for your services but once you're in there's a lot of value. So you can automatically generate client libraries for many different languages and you can automatically perform validation of requests and responses. So the unicorn is happy now, no more tears, we fixed the unicorn's world. Are there any questions? Right, so the comment is that the examples that I gave you were with Swagger specs separate from the code, can you do Swagger specs in line with code and I think you've seen an example of it done like that in PHP where it's actually with the code. Yes, you can do that. At Yelp we found it quite valuable to actually have the specs separate from the code because that way you can review specs separate from any implementation but it kind of depends on what you want and I can also imagine cases where it's a lot easier to inline the spec with your code because I know that for some of the Java frameworks you can put the Java annotations on your methods saying what types it takes, what types it returns and it will automatically generate a Swagger spec from those. So yes, that is an option. So the question is how do you use Swagger with JSON API where it envelopes the JSON response? So I'm not very familiar with JSON API but presumably if Swagger can actually express the JSON API types then that would work. I imagine JSON API uses pretty standard objects and types like strings and Booleans and integers and so I imagine you could code that up as a Swagger spec but again I don't know all the details there. Oh so the question is is there a way of specifying a base template that you can inherit in your Swagger specs so there is support for inheritance but I'm not quite sure how that would work with JSON API. So yeah, not sure, that's the answer. Any other questions? Okay, so the question is how does the workflow work? Does a PM sort of define the spec and then hand it off to a programmer? So yeah, PMs are involved with details of the coding but we normally have the programmers actually take the lead on defining the specs and the PM can work with the programmers so it's not like waterfall, PM does this, hands it over to the programmer then the programmer does the implementation. It's much more collaborative. So the question is are there any other tools that we use for handing off specs from PMs to implementers? I know that we still do have some written spec documents for some of our older APIs and so those still exist and I think there might be a little bit of automated tooling around those. So yeah, like spec docs are still used by a few PMs. I think if I can remember correctly the teams who are still using spec docs do not use Swagger so they really are just going from the spec doc to the implementation. Any other questions? So the question is did we encounter any disadvantages to using Swagger? So before Swagger 2.0, there were some idioms that we could not encode for existing services so those map types, I don't think we could actually do those which prevented some adoption. Other issues, let me think. The validation can be a little slow. It's not really slow but it can be noticeable especially if you're validating large data structures and so I think one or two teams have noticed these problems especially in something like Python which doesn't tend to be quite as fast as Java and I guess the other problem, if you can call it a problem, is that Swagger forces you to write these things up front and for some times that can be a bit of a challenge because it keeps you honest. I would say that's a positive but it's an additional step in the road. So the question is are there any problems that we've had? Right, yes, so are there any problems retrofitting Swagger specs to horribly designed maybe legacy applications? So there was the map problem that I spoke about before that problem is now fixed. I think if you do some kind of odd patterns like if you could write an endpoint if it gets an even number, it returns a string, if it gets an odd number, it returns an integer, that might be quite hard to type in Swagger. You might say you shouldn't be doing that maybe but it is that it is. I believe so, yes, those are the cases I have come across during retrofitting of Swagger specs but there may be other edge cases but I haven't seen them. So paging for results. So you would pass in a kind of an offset parameter. So if you want to do paging then you can actually just pass as part of your request as probably a query parameter that says here's the offset and here's the number of results for that offset. So it's not going to automatically make sure you're doing your paging correctly but it will check that you're passing integers for your offsets and your sort of window sizes. That's correct. Out of the box it can do most things that I have seen. Yes. Right, so the question is, am I familiar with Apuri and how does it compare with Swagger? I only have given it a brief glance actually so I can't really give you a full comparison. Certainly what I like about Swagger is that it seems to have a very large vibrant open source community and the tooling seems to be very good and so that was why I went with Swagger but I can't really give you a comparison. Okay, so the question is, have I had an experience using Swagger with sort of client side stuff? The answer is no. So right now we're using Swagger for not all of the majority of our backend services so I can't really talk to how it would work with Angular or something like that but presumably it's still a pretty similar game where you're just typing things and checking and validating so I wouldn't imagine it's hugely different. Do we integrate HMAC? Sort of authentication type things. Do we integrate HMAC? I am going to punt on security questions. Okay, anyone else? Okay, let's call it a day. Thank you very much.